Commit 5b5509d

Browse files
RafaelGSSBethGriggsAditi-1400joyeecheungtniessen
committed
doc: create ai-guidelines and include to CONTRIBUTING
Co-authored-by: Beth Griggs <bethanyngriggs@gmail.com> Co-authored-by: Aditi <62544124+Aditi-1400@users.noreply.github.com> Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com> Co-authored-by: Tobias Nießen <tniessen@tnie.de> Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Co-authored-by: Efe <dogukankrskl@gmail.com> Co-authored-by: James M Snell <jasnell@gmail.com> Co-authored-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com> PR-URL: #62105 Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Aditi Singh <aditisingh1400@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Claudio Wunder <cwunder@gnome.org> Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
1 parent bf86fab commit 5b5509d

2 files changed

Lines changed: 108 additions & 0 deletions

File tree

β€ŽCONTRIBUTING.mdβ€Ž

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ works.
2525
*[Issues](#issues)
2626
*[Pull Requests](#pull-requests)
2727
*[Automation and bots](#automation-and-bots)
28+
*[AI Use Policy and Guidelines](#ai-use-policy-and-guidelines)
2829
*[Developer's Certificate of Origin 1.1](#developers-certificate-of-origin-11)
2930

3031
## [Code of Conduct](./doc/contributing/code-of-conduct.md)
@@ -66,6 +67,15 @@ by an automation that was not authorized by Node.js collaborators are
6667
subject to immediate moderation enforcement on the automation and owner
6768
without notice.
6869

70+
## [AI Use Policy and Guidelines](./doc/contributing/ai-guidelines.md)
71+
72+
Node.js requires contributors to understand and take full responsibility for
73+
every change they propose. Pull requests containing AI-generated code the
74+
contributor has not personally understood, tested, and verified will likely be closed
75+
without review.
76+
77+
See [details on our AI use policy and guidelines](./doc/contributing/ai-guidelines.md).
78+
6979
## Developer's Certificate of Origin 1.1
7080

7181
```text
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# AI use policy and guidelines
2+
3+
*[Core principle](#core-principle)
4+
*[When AI is used in contributions](#when-ai-is-used-in-contributions)
5+
*[When AI is used in communications](#when-ai-is-used-in-communications)
6+
7+
This document aligns with the [OpenJS Foundation AI Coding Assistants Policy][].
8+
9+
## Core principle
10+
11+
Tools should never replace human judgment, regardless of whether they are
12+
powered by AI.
13+
14+
Node.js requires contributors to understand and take full responsibility for
15+
every change they propose. The answer to "Why is X an improvement?" can
16+
never be "I'm not sure. The AI did it."
17+
18+
If AI tools assisted in generating a contribution, acknowledge that honestly.
19+
Regardless of how much code is generated by AI, disclosure does not serve
20+
as a disclaimer of responsibility.
21+
22+
Be aware that the mention of for-profit trademarks or commercial brands in
23+
commit messages, which are part of the code base, can be abused for
24+
profit-driven marketing. If the disclosure involves for-profit trademarks or
25+
commercial brands, it's recommended to either anonymize the branding (e.g. say
26+
`a frontier reasoning model`, `a closed-source coding agent` instead of
27+
`<brand>`), or only mention the for-profit brand/trademark in the PR
28+
description, but not in the commit message, unless the message would not have
29+
made sense without mentioning the specific brand/trademark. These
30+
recommendations only apply to for-profit tools/models, not any non-profit ones.
31+
32+
Pull requests that contain AI-generated code the contributor has not
33+
personally understood, tested, and verified waste collaborator time and
34+
will be subject to closure without additional review. Contributors who
35+
repeatedly submit such changes, show no understanding of the project or
36+
its processes, or are dishonest about the use of automated assistance
37+
may be blocked from further contributions.
38+
39+
Pull requests must not be opened by automated tooling, unless specifically
40+
approved in advance by the project. To request approval, either open an issue in
41+
[nodejs/admin](https://github.com/nodejs/admin/issues), or if the automation can
42+
be done in the form of a GitHub workflow, submit a pull request to add the
43+
workflow and use the usual pull request review process to seek consensus.
44+
45+
## When AI is used in contributions
46+
47+
Contributors may use AI tools to assist with contributions, but such tools
48+
never replace human judgment.
49+
50+
When using AI as a coding assistant:
51+
52+
***Understand the codebase first.** Do not skip familiarizing yourself with
53+
the relevant subsystem. Always verify analysis generated by tools against
54+
the actual source code with human judgement.
55+
56+
***Own every line you submit.** You are responsible for all code in your
57+
pull request, regardless of how it was created. The submitted changes
58+
must satisfy the project's [Developer's Certificate of Origin][] and licensing
59+
requirements. Be prepared to explain any change in detail during review.
60+
61+
***Keep the commits logical.** The [commit message guidelines][]
62+
and [commit squashing guidelines](./pull-requests.md#commit-squashing)
63+
must be followed regardless of what tool is used in the pull request.
64+
65+
***Test thoroughly.** Existing tests should not be removed or modified
66+
without human verification. It is crucial to verify, with human judgement,
67+
the correctness of new tests against the intended behavior of the feature
68+
being tested, independently of how the implementation happens to behave.
69+
70+
***Do not disappear.** If you open a PR, follow it through. Respond to
71+
feedback and iterate until the work lands or is explicitly closed. If you
72+
can no longer pursue it, close the PR. Stalled PRs block progress.
73+
74+
***Do not use AI to claim "good first issue" tasks.** These issues exist to
75+
help new contributors learn the codebase and processes hands-on.
76+
77+
***Keep the comments useful.** Verify with human judgement that the
78+
comments are necessary and accurate. Remove comments that simply
79+
restate what the code does. Add comments only where the logic is non-obvious.
80+
81+
## When AI is used in communications
82+
83+
Node.js values concise, precise communication that respects collaborator and
84+
contributor time.
85+
86+
***Do not paste messages generated entirely by AI** in pull requests, issues,
87+
or the project's communication channels. Such communication may be removed in
88+
accordance to [the Node.js moderation policy][].
89+
***Verify claims about the code with human judgement before using them in
90+
communications**. Results from AI tools should only be treated as hypothesis.
91+
Link to actual code, documentation and specifications as source of truth.
92+
* Grammar and spell-check tools are acceptable when they improve clarity and
93+
conciseness.
94+
95+
[Developer's Certificate of Origin]: ../../CONTRIBUTING.md#developers-certificate-of-origin-11
96+
[OpenJS Foundation AI Coding Assistants Policy]: https://ai-coding-assistants-policy.openjsf.org/
97+
[commit message guidelines]: ./pull-requests.md#commit-message-guidelines
98+
[the Node.js moderation policy]: https://github.com/nodejs/admin/blob/main/Moderation-Policy.md

0 commit comments

Comments
Β (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Commit 5b5509d

Browse files
RafaelGSSBethGriggsAditi-1400joyeecheungtniessen
committed
doc: create ai-guidelines and include to CONTRIBUTING
Co-authored-by: Beth Griggs <bethanyngriggs@gmail.com> Co-authored-by: Aditi <62544124+Aditi-1400@users.noreply.github.com> Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com> Co-authored-by: Tobias Nießen <tniessen@tnie.de> Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Co-authored-by: Efe <dogukankrskl@gmail.com> Co-authored-by: James M Snell <jasnell@gmail.com> Co-authored-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com> PR-URL: #62105 Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Aditi Singh <aditisingh1400@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Claudio Wunder <cwunder@gnome.org> Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
1 parent bf86fab commit 5b5509d

2 files changed

Lines changed: 108 additions & 0 deletions

File tree

β€ŽCONTRIBUTING.mdβ€Ž

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ works.
2525
*[Issues](#issues)
2626
*[Pull Requests](#pull-requests)
2727
*[Automation and bots](#automation-and-bots)
28+
*[AI Use Policy and Guidelines](#ai-use-policy-and-guidelines)
2829
*[Developer's Certificate of Origin 1.1](#developers-certificate-of-origin-11)
2930

3031
## [Code of Conduct](./doc/contributing/code-of-conduct.md)
@@ -66,6 +67,15 @@ by an automation that was not authorized by Node.js collaborators are
6667
subject to immediate moderation enforcement on the automation and owner
6768
without notice.
6869

70+
## [AI Use Policy and Guidelines](./doc/contributing/ai-guidelines.md)
71+
72+
Node.js requires contributors to understand and take full responsibility for
73+
every change they propose. Pull requests containing AI-generated code the
74+
contributor has not personally understood, tested, and verified will likely be closed
75+
without review.
76+
77+
See [details on our AI use policy and guidelines](./doc/contributing/ai-guidelines.md).
78+
6979
## Developer's Certificate of Origin 1.1
7080

7181
```text
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# AI use policy and guidelines
2+
3+
*[Core principle](#core-principle)
4+
*[When AI is used in contributions](#when-ai-is-used-in-contributions)
5+
*[When AI is used in communications](#when-ai-is-used-in-communications)
6+
7+
This document aligns with the [OpenJS Foundation AI Coding Assistants Policy][].
8+
9+
## Core principle
10+
11+
Tools should never replace human judgment, regardless of whether they are
12+
powered by AI.
13+
14+
Node.js requires contributors to understand and take full responsibility for
15+
every change they propose. The answer to "Why is X an improvement?" can
16+
never be "I'm not sure. The AI did it."
17+
18+
If AI tools assisted in generating a contribution, acknowledge that honestly.
19+
Regardless of how much code is generated by AI, disclosure does not serve
20+
as a disclaimer of responsibility.
21+
22+
Be aware that the mention of for-profit trademarks or commercial brands in
23+
commit messages, which are part of the code base, can be abused for
24+
profit-driven marketing. If the disclosure involves for-profit trademarks or
25+
commercial brands, it's recommended to either anonymize the branding (e.g. say
26+
`a frontier reasoning model`, `a closed-source coding agent` instead of
27+
`<brand>`), or only mention the for-profit brand/trademark in the PR
28+
description, but not in the commit message, unless the message would not have
29+
made sense without mentioning the specific brand/trademark. These
30+
recommendations only apply to for-profit tools/models, not any non-profit ones.
31+
32+
Pull requests that contain AI-generated code the contributor has not
33+
personally understood, tested, and verified waste collaborator time and
34+
will be subject to closure without additional review. Contributors who
35+
repeatedly submit such changes, show no understanding of the project or
36+
its processes, or are dishonest about the use of automated assistance
37+
may be blocked from further contributions.
38+
39+
Pull requests must not be opened by automated tooling, unless specifically
40+
approved in advance by the project. To request approval, either open an issue in
41+
[nodejs/admin](https://github.com/nodejs/admin/issues), or if the automation can
42+
be done in the form of a GitHub workflow, submit a pull request to add the
43+
workflow and use the usual pull request review process to seek consensus.
44+
45+
## When AI is used in contributions
46+
47+
Contributors may use AI tools to assist with contributions, but such tools
48+
never replace human judgment.
49+
50+
When using AI as a coding assistant:
51+
52+
***Understand the codebase first.** Do not skip familiarizing yourself with
53+
the relevant subsystem. Always verify analysis generated by tools against
54+
the actual source code with human judgement.
55+
56+
***Own every line you submit.** You are responsible for all code in your
57+
pull request, regardless of how it was created. The submitted changes
58+
must satisfy the project's [Developer's Certificate of Origin][] and licensing
59+
requirements. Be prepared to explain any change in detail during review.
60+
61+
***Keep the commits logical.** The [commit message guidelines][]
62+
and [commit squashing guidelines](./pull-requests.md#commit-squashing)
63+
must be followed regardless of what tool is used in the pull request.
64+
65+
***Test thoroughly.** Existing tests should not be removed or modified
66+
without human verification. It is crucial to verify, with human judgement,
67+
the correctness of new tests against the intended behavior of the feature
68+
being tested, independently of how the implementation happens to behave.
69+
70+
***Do not disappear.** If you open a PR, follow it through. Respond to
71+
feedback and iterate until the work lands or is explicitly closed. If you
72+
can no longer pursue it, close the PR. Stalled PRs block progress.
73+
74+
***Do not use AI to claim "good first issue" tasks.** These issues exist to
75+
help new contributors learn the codebase and processes hands-on.
76+
77+
***Keep the comments useful.** Verify with human judgement that the
78+
comments are necessary and accurate. Remove comments that simply
79+
restate what the code does. Add comments only where the logic is non-obvious.
80+
81+
## When AI is used in communications
82+
83+
Node.js values concise, precise communication that respects collaborator and
84+
contributor time.
85+
86+
***Do not paste messages generated entirely by AI** in pull requests, issues,
87+
or the project's communication channels. Such communication may be removed in
88+
accordance to [the Node.js moderation policy][].
89+
***Verify claims about the code with human judgement before using them in
90+
communications**. Results from AI tools should only be treated as hypothesis.
91+
Link to actual code, documentation and specifications as source of truth.
92+
* Grammar and spell-check tools are acceptable when they improve clarity and
93+
conciseness.
94+
95+
[Developer's Certificate of Origin]: ../../CONTRIBUTING.md#developers-certificate-of-origin-11
96+
[OpenJS Foundation AI Coding Assistants Policy]: https://ai-coding-assistants-policy.openjsf.org/
97+
[commit message guidelines]: ./pull-requests.md#commit-message-guidelines
98+
[the Node.js moderation policy]: https://github.com/nodejs/admin/blob/main/Moderation-Policy.md

0 commit comments

Comments
Β (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit 5b5509d

Browse files
RafaelGSSBethGriggsAditi-1400joyeecheungtniessen
committed
doc: create ai-guidelines and include to CONTRIBUTING
Co-authored-by: Beth Griggs <bethanyngriggs@gmail.com> Co-authored-by: Aditi <62544124+Aditi-1400@users.noreply.github.com> Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com> Co-authored-by: Tobias Nießen <tniessen@tnie.de> Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Co-authored-by: Efe <dogukankrskl@gmail.com> Co-authored-by: James M Snell <jasnell@gmail.com> Co-authored-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com> PR-URL: #62105 Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Aditi Singh <aditisingh1400@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Claudio Wunder <cwunder@gnome.org> Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
1 parent bf86fab commit 5b5509d

2 files changed

Lines changed: 108 additions & 0 deletions

File tree

β€ŽCONTRIBUTING.mdβ€Ž

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ works.
2525
*[Issues](#issues)
2626
*[Pull Requests](#pull-requests)
2727
*[Automation and bots](#automation-and-bots)
28+
*[AI Use Policy and Guidelines](#ai-use-policy-and-guidelines)
2829
*[Developer's Certificate of Origin 1.1](#developers-certificate-of-origin-11)
2930

3031
## [Code of Conduct](./doc/contributing/code-of-conduct.md)
@@ -66,6 +67,15 @@ by an automation that was not authorized by Node.js collaborators are
6667
subject to immediate moderation enforcement on the automation and owner
6768
without notice.
6869

70+
## [AI Use Policy and Guidelines](./doc/contributing/ai-guidelines.md)
71+
72+
Node.js requires contributors to understand and take full responsibility for
73+
every change they propose. Pull requests containing AI-generated code the
74+
contributor has not personally understood, tested, and verified will likely be closed
75+
without review.
76+
77+
See [details on our AI use policy and guidelines](./doc/contributing/ai-guidelines.md).
78+
6979
## Developer's Certificate of Origin 1.1
7080

7181
```text
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# AI use policy and guidelines
2+
3+
*[Core principle](#core-principle)
4+
*[When AI is used in contributions](#when-ai-is-used-in-contributions)
5+
*[When AI is used in communications](#when-ai-is-used-in-communications)
6+
7+
This document aligns with the [OpenJS Foundation AI Coding Assistants Policy][].
8+
9+
## Core principle
10+
11+
Tools should never replace human judgment, regardless of whether they are
12+
powered by AI.
13+
14+
Node.js requires contributors to understand and take full responsibility for
15+
every change they propose. The answer to "Why is X an improvement?" can
16+
never be "I'm not sure. The AI did it."
17+
18+
If AI tools assisted in generating a contribution, acknowledge that honestly.
19+
Regardless of how much code is generated by AI, disclosure does not serve
20+
as a disclaimer of responsibility.
21+
22+
Be aware that the mention of for-profit trademarks or commercial brands in
23+
commit messages, which are part of the code base, can be abused for
24+
profit-driven marketing. If the disclosure involves for-profit trademarks or
25+
commercial brands, it's recommended to either anonymize the branding (e.g. say
26+
`a frontier reasoning model`, `a closed-source coding agent` instead of
27+
`<brand>`), or only mention the for-profit brand/trademark in the PR
28+
description, but not in the commit message, unless the message would not have
29+
made sense without mentioning the specific brand/trademark. These
30+
recommendations only apply to for-profit tools/models, not any non-profit ones.
31+
32+
Pull requests that contain AI-generated code the contributor has not
33+
personally understood, tested, and verified waste collaborator time and
34+
will be subject to closure without additional review. Contributors who
35+
repeatedly submit such changes, show no understanding of the project or
36+
its processes, or are dishonest about the use of automated assistance
37+
may be blocked from further contributions.
38+
39+
Pull requests must not be opened by automated tooling, unless specifically
40+
approved in advance by the project. To request approval, either open an issue in
41+
[nodejs/admin](https://github.com/nodejs/admin/issues), or if the automation can
42+
be done in the form of a GitHub workflow, submit a pull request to add the
43+
workflow and use the usual pull request review process to seek consensus.
44+
45+
## When AI is used in contributions
46+
47+
Contributors may use AI tools to assist with contributions, but such tools
48+
never replace human judgment.
49+
50+
When using AI as a coding assistant:
51+
52+
***Understand the codebase first.** Do not skip familiarizing yourself with
53+
the relevant subsystem. Always verify analysis generated by tools against
54+
the actual source code with human judgement.
55+
56+
***Own every line you submit.** You are responsible for all code in your
57+
pull request, regardless of how it was created. The submitted changes
58+
must satisfy the project's [Developer's Certificate of Origin][] and licensing
59+
requirements. Be prepared to explain any change in detail during review.
60+
61+
***Keep the commits logical.** The [commit message guidelines][]
62+
and [commit squashing guidelines](./pull-requests.md#commit-squashing)
63+
must be followed regardless of what tool is used in the pull request.
64+
65+
***Test thoroughly.** Existing tests should not be removed or modified
66+
without human verification. It is crucial to verify, with human judgement,
67+
the correctness of new tests against the intended behavior of the feature
68+
being tested, independently of how the implementation happens to behave.
69+
70+
***Do not disappear.** If you open a PR, follow it through. Respond to
71+
feedback and iterate until the work lands or is explicitly closed. If you
72+
can no longer pursue it, close the PR. Stalled PRs block progress.
73+
74+
***Do not use AI to claim "good first issue" tasks.** These issues exist to
75+
help new contributors learn the codebase and processes hands-on.
76+
77+
***Keep the comments useful.** Verify with human judgement that the
78+
comments are necessary and accurate. Remove comments that simply
79+
restate what the code does. Add comments only where the logic is non-obvious.
80+
81+
## When AI is used in communications
82+
83+
Node.js values concise, precise communication that respects collaborator and
84+
contributor time.
85+
86+
***Do not paste messages generated entirely by AI** in pull requests, issues,
87+
or the project's communication channels. Such communication may be removed in
88+
accordance to [the Node.js moderation policy][].
89+
***Verify claims about the code with human judgement before using them in
90+
communications**. Results from AI tools should only be treated as hypothesis.
91+
Link to actual code, documentation and specifications as source of truth.
92+
* Grammar and spell-check tools are acceptable when they improve clarity and
93+
conciseness.
94+
95+
[Developer's Certificate of Origin]: ../../CONTRIBUTING.md#developers-certificate-of-origin-11
96+
[OpenJS Foundation AI Coding Assistants Policy]: https://ai-coding-assistants-policy.openjsf.org/
97+
[commit message guidelines]: ./pull-requests.md#commit-message-guidelines
98+
[the Node.js moderation policy]: https://github.com/nodejs/admin/blob/main/Moderation-Policy.md

0 commit comments

Comments
Β (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit 5b5509d

Browse files
RafaelGSSBethGriggsAditi-1400joyeecheungtniessen
committed
doc: create ai-guidelines and include to CONTRIBUTING
Co-authored-by: Beth Griggs <bethanyngriggs@gmail.com> Co-authored-by: Aditi <62544124+Aditi-1400@users.noreply.github.com> Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com> Co-authored-by: Tobias Nießen <tniessen@tnie.de> Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Co-authored-by: Efe <dogukankrskl@gmail.com> Co-authored-by: James M Snell <jasnell@gmail.com> Co-authored-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com> PR-URL: #62105 Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Aditi Singh <aditisingh1400@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Claudio Wunder <cwunder@gnome.org> Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
1 parent bf86fab commit 5b5509d

2 files changed

Lines changed: 108 additions & 0 deletions

File tree

β€ŽCONTRIBUTING.mdβ€Ž

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ works.
2525
*[Issues](#issues)
2626
*[Pull Requests](#pull-requests)
2727
*[Automation and bots](#automation-and-bots)
28+
*[AI Use Policy and Guidelines](#ai-use-policy-and-guidelines)
2829
*[Developer's Certificate of Origin 1.1](#developers-certificate-of-origin-11)
2930

3031
## [Code of Conduct](./doc/contributing/code-of-conduct.md)
@@ -66,6 +67,15 @@ by an automation that was not authorized by Node.js collaborators are
6667
subject to immediate moderation enforcement on the automation and owner
6768
without notice.
6869

70+
## [AI Use Policy and Guidelines](./doc/contributing/ai-guidelines.md)
71+
72+
Node.js requires contributors to understand and take full responsibility for
73+
every change they propose. Pull requests containing AI-generated code the
74+
contributor has not personally understood, tested, and verified will likely be closed
75+
without review.
76+
77+
See [details on our AI use policy and guidelines](./doc/contributing/ai-guidelines.md).
78+
6979
## Developer's Certificate of Origin 1.1
7080

7181
```text
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# AI use policy and guidelines
2+
3+
*[Core principle](#core-principle)
4+
*[When AI is used in contributions](#when-ai-is-used-in-contributions)
5+
*[When AI is used in communications](#when-ai-is-used-in-communications)
6+
7+
This document aligns with the [OpenJS Foundation AI Coding Assistants Policy][].
8+
9+
## Core principle
10+
11+
Tools should never replace human judgment, regardless of whether they are
12+
powered by AI.
13+
14+
Node.js requires contributors to understand and take full responsibility for
15+
every change they propose. The answer to "Why is X an improvement?" can
16+
never be "I'm not sure. The AI did it."
17+
18+
If AI tools assisted in generating a contribution, acknowledge that honestly.
19+
Regardless of how much code is generated by AI, disclosure does not serve
20+
as a disclaimer of responsibility.
21+
22+
Be aware that the mention of for-profit trademarks or commercial brands in
23+
commit messages, which are part of the code base, can be abused for
24+
profit-driven marketing. If the disclosure involves for-profit trademarks or
25+
commercial brands, it's recommended to either anonymize the branding (e.g. say
26+
`a frontier reasoning model`, `a closed-source coding agent` instead of
27+
`<brand>`), or only mention the for-profit brand/trademark in the PR
28+
description, but not in the commit message, unless the message would not have
29+
made sense without mentioning the specific brand/trademark. These
30+
recommendations only apply to for-profit tools/models, not any non-profit ones.
31+
32+
Pull requests that contain AI-generated code the contributor has not
33+
personally understood, tested, and verified waste collaborator time and
34+
will be subject to closure without additional review. Contributors who
35+
repeatedly submit such changes, show no understanding of the project or
36+
its processes, or are dishonest about the use of automated assistance
37+
may be blocked from further contributions.
38+
39+
Pull requests must not be opened by automated tooling, unless specifically
40+
approved in advance by the project. To request approval, either open an issue in
41+
[nodejs/admin](https://github.com/nodejs/admin/issues), or if the automation can
42+
be done in the form of a GitHub workflow, submit a pull request to add the
43+
workflow and use the usual pull request review process to seek consensus.
44+
45+
## When AI is used in contributions
46+
47+
Contributors may use AI tools to assist with contributions, but such tools
48+
never replace human judgment.
49+
50+
When using AI as a coding assistant:
51+
52+
***Understand the codebase first.** Do not skip familiarizing yourself with
53+
the relevant subsystem. Always verify analysis generated by tools against
54+
the actual source code with human judgement.
55+
56+
***Own every line you submit.** You are responsible for all code in your
57+
pull request, regardless of how it was created. The submitted changes
58+
must satisfy the project's [Developer's Certificate of Origin][] and licensing
59+
requirements. Be prepared to explain any change in detail during review.
60+
61+
***Keep the commits logical.** The [commit message guidelines][]
62+
and [commit squashing guidelines](./pull-requests.md#commit-squashing)
63+
must be followed regardless of what tool is used in the pull request.
64+
65+
***Test thoroughly.** Existing tests should not be removed or modified
66+
without human verification. It is crucial to verify, with human judgement,
67+
the correctness of new tests against the intended behavior of the feature
68+
being tested, independently of how the implementation happens to behave.
69+
70+
***Do not disappear.** If you open a PR, follow it through. Respond to
71+
feedback and iterate until the work lands or is explicitly closed. If you
72+
can no longer pursue it, close the PR. Stalled PRs block progress.
73+
74+
***Do not use AI to claim "good first issue" tasks.** These issues exist to
75+
help new contributors learn the codebase and processes hands-on.
76+
77+
***Keep the comments useful.** Verify with human judgement that the
78+
comments are necessary and accurate. Remove comments that simply
79+
restate what the code does. Add comments only where the logic is non-obvious.
80+
81+
## When AI is used in communications
82+
83+
Node.js values concise, precise communication that respects collaborator and
84+
contributor time.
85+
86+
***Do not paste messages generated entirely by AI** in pull requests, issues,
87+
or the project's communication channels. Such communication may be removed in
88+
accordance to [the Node.js moderation policy][].
89+
***Verify claims about the code with human judgement before using them in
90+
communications**. Results from AI tools should only be treated as hypothesis.
91+
Link to actual code, documentation and specifications as source of truth.
92+
* Grammar and spell-check tools are acceptable when they improve clarity and
93+
conciseness.
94+
95+
[Developer's Certificate of Origin]: ../../CONTRIBUTING.md#developers-certificate-of-origin-11
96+
[OpenJS Foundation AI Coding Assistants Policy]: https://ai-coding-assistants-policy.openjsf.org/
97+
[commit message guidelines]: ./pull-requests.md#commit-message-guidelines
98+
[the Node.js moderation policy]: https://github.com/nodejs/admin/blob/main/Moderation-Policy.md

0 commit comments

Comments
Β (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Commit 5b5509d

Browse files
RafaelGSSBethGriggsAditi-1400joyeecheungtniessen
committed
doc: create ai-guidelines and include to CONTRIBUTING
Co-authored-by: Beth Griggs <bethanyngriggs@gmail.com> Co-authored-by: Aditi <62544124+Aditi-1400@users.noreply.github.com> Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com> Co-authored-by: Tobias Nießen <tniessen@tnie.de> Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Co-authored-by: Efe <dogukankrskl@gmail.com> Co-authored-by: James M Snell <jasnell@gmail.com> Co-authored-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com> PR-URL: #62105 Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Aditi Singh <aditisingh1400@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Claudio Wunder <cwunder@gnome.org> Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
1 parent bf86fab commit 5b5509d

2 files changed

Lines changed: 108 additions & 0 deletions

File tree

β€ŽCONTRIBUTING.mdβ€Ž

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ works.
2525
*[Issues](#issues)
2626
*[Pull Requests](#pull-requests)
2727
*[Automation and bots](#automation-and-bots)
28+
*[AI Use Policy and Guidelines](#ai-use-policy-and-guidelines)
2829
*[Developer's Certificate of Origin 1.1](#developers-certificate-of-origin-11)
2930

3031
## [Code of Conduct](./doc/contributing/code-of-conduct.md)
@@ -66,6 +67,15 @@ by an automation that was not authorized by Node.js collaborators are
6667
subject to immediate moderation enforcement on the automation and owner
6768
without notice.
6869

70+
## [AI Use Policy and Guidelines](./doc/contributing/ai-guidelines.md)
71+
72+
Node.js requires contributors to understand and take full responsibility for
73+
every change they propose. Pull requests containing AI-generated code the
74+
contributor has not personally understood, tested, and verified will likely be closed
75+
without review.
76+
77+
See [details on our AI use policy and guidelines](./doc/contributing/ai-guidelines.md).
78+
6979
## Developer's Certificate of Origin 1.1
7080

7181
```text
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# AI use policy and guidelines
2+
3+
*[Core principle](#core-principle)
4+
*[When AI is used in contributions](#when-ai-is-used-in-contributions)
5+
*[When AI is used in communications](#when-ai-is-used-in-communications)
6+
7+
This document aligns with the [OpenJS Foundation AI Coding Assistants Policy][].
8+
9+
## Core principle
10+
11+
Tools should never replace human judgment, regardless of whether they are
12+
powered by AI.
13+
14+
Node.js requires contributors to understand and take full responsibility for
15+
every change they propose. The answer to "Why is X an improvement?" can
16+
never be "I'm not sure. The AI did it."
17+
18+
If AI tools assisted in generating a contribution, acknowledge that honestly.
19+
Regardless of how much code is generated by AI, disclosure does not serve
20+
as a disclaimer of responsibility.
21+
22+
Be aware that the mention of for-profit trademarks or commercial brands in
23+
commit messages, which are part of the code base, can be abused for
24+
profit-driven marketing. If the disclosure involves for-profit trademarks or
25+
commercial brands, it's recommended to either anonymize the branding (e.g. say
26+
`a frontier reasoning model`, `a closed-source coding agent` instead of
27+
`<brand>`), or only mention the for-profit brand/trademark in the PR
28+
description, but not in the commit message, unless the message would not have
29+
made sense without mentioning the specific brand/trademark. These
30+
recommendations only apply to for-profit tools/models, not any non-profit ones.
31+
32+
Pull requests that contain AI-generated code the contributor has not
33+
personally understood, tested, and verified waste collaborator time and
34+
will be subject to closure without additional review. Contributors who
35+
repeatedly submit such changes, show no understanding of the project or
36+
its processes, or are dishonest about the use of automated assistance
37+
may be blocked from further contributions.
38+
39+
Pull requests must not be opened by automated tooling, unless specifically
40+
approved in advance by the project. To request approval, either open an issue in
41+
[nodejs/admin](https://github.com/nodejs/admin/issues), or if the automation can
42+
be done in the form of a GitHub workflow, submit a pull request to add the
43+
workflow and use the usual pull request review process to seek consensus.
44+
45+
## When AI is used in contributions
46+
47+
Contributors may use AI tools to assist with contributions, but such tools
48+
never replace human judgment.
49+
50+
When using AI as a coding assistant:
51+
52+
***Understand the codebase first.** Do not skip familiarizing yourself with
53+
the relevant subsystem. Always verify analysis generated by tools against
54+
the actual source code with human judgement.
55+
56+
***Own every line you submit.** You are responsible for all code in your
57+
pull request, regardless of how it was created. The submitted changes
58+
must satisfy the project's [Developer's Certificate of Origin][] and licensing
59+
requirements. Be prepared to explain any change in detail during review.
60+
61+
***Keep the commits logical.** The [commit message guidelines][]
62+
and [commit squashing guidelines](./pull-requests.md#commit-squashing)
63+
must be followed regardless of what tool is used in the pull request.
64+
65+
***Test thoroughly.** Existing tests should not be removed or modified
66+
without human verification. It is crucial to verify, with human judgement,
67+
the correctness of new tests against the intended behavior of the feature
68+
being tested, independently of how the implementation happens to behave.
69+
70+
***Do not disappear.** If you open a PR, follow it through. Respond to
71+
feedback and iterate until the work lands or is explicitly closed. If you
72+
can no longer pursue it, close the PR. Stalled PRs block progress.
73+
74+
***Do not use AI to claim "good first issue" tasks.** These issues exist to
75+
help new contributors learn the codebase and processes hands-on.
76+
77+
***Keep the comments useful.** Verify with human judgement that the
78+
comments are necessary and accurate. Remove comments that simply
79+
restate what the code does. Add comments only where the logic is non-obvious.
80+
81+
## When AI is used in communications
82+
83+
Node.js values concise, precise communication that respects collaborator and
84+
contributor time.
85+
86+
***Do not paste messages generated entirely by AI** in pull requests, issues,
87+
or the project's communication channels. Such communication may be removed in
88+
accordance to [the Node.js moderation policy][].
89+
***Verify claims about the code with human judgement before using them in
90+
communications**. Results from AI tools should only be treated as hypothesis.
91+
Link to actual code, documentation and specifications as source of truth.
92+
* Grammar and spell-check tools are acceptable when they improve clarity and
93+
conciseness.
94+
95+
[Developer's Certificate of Origin]: ../../CONTRIBUTING.md#developers-certificate-of-origin-11
96+
[OpenJS Foundation AI Coding Assistants Policy]: https://ai-coding-assistants-policy.openjsf.org/
97+
[commit message guidelines]: ./pull-requests.md#commit-message-guidelines
98+
[the Node.js moderation policy]: https://github.com/nodejs/admin/blob/main/Moderation-Policy.md

0 commit comments

Comments
Β (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit 5b5509d

Browse files
RafaelGSSBethGriggsAditi-1400joyeecheungtniessen
committed
doc: create ai-guidelines and include to CONTRIBUTING
Co-authored-by: Beth Griggs <bethanyngriggs@gmail.com> Co-authored-by: Aditi <62544124+Aditi-1400@users.noreply.github.com> Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com> Co-authored-by: Tobias Nießen <tniessen@tnie.de> Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Co-authored-by: Efe <dogukankrskl@gmail.com> Co-authored-by: James M Snell <jasnell@gmail.com> Co-authored-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com> PR-URL: #62105 Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Aditi Singh <aditisingh1400@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Claudio Wunder <cwunder@gnome.org> Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
1 parent bf86fab commit 5b5509d

2 files changed

Lines changed: 108 additions & 0 deletions

File tree

β€ŽCONTRIBUTING.mdβ€Ž

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ works.
2525
*[Issues](#issues)
2626
*[Pull Requests](#pull-requests)
2727
*[Automation and bots](#automation-and-bots)
28+
*[AI Use Policy and Guidelines](#ai-use-policy-and-guidelines)
2829
*[Developer's Certificate of Origin 1.1](#developers-certificate-of-origin-11)
2930

3031
## [Code of Conduct](./doc/contributing/code-of-conduct.md)
@@ -66,6 +67,15 @@ by an automation that was not authorized by Node.js collaborators are
6667
subject to immediate moderation enforcement on the automation and owner
6768
without notice.
6869

70+
## [AI Use Policy and Guidelines](./doc/contributing/ai-guidelines.md)
71+
72+
Node.js requires contributors to understand and take full responsibility for
73+
every change they propose. Pull requests containing AI-generated code the
74+
contributor has not personally understood, tested, and verified will likely be closed
75+
without review.
76+
77+
See [details on our AI use policy and guidelines](./doc/contributing/ai-guidelines.md).
78+
6979
## Developer's Certificate of Origin 1.1
7080

7181
```text
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# AI use policy and guidelines
2+
3+
*[Core principle](#core-principle)
4+
*[When AI is used in contributions](#when-ai-is-used-in-contributions)
5+
*[When AI is used in communications](#when-ai-is-used-in-communications)
6+
7+
This document aligns with the [OpenJS Foundation AI Coding Assistants Policy][].
8+
9+
## Core principle
10+
11+
Tools should never replace human judgment, regardless of whether they are
12+
powered by AI.
13+
14+
Node.js requires contributors to understand and take full responsibility for
15+
every change they propose. The answer to "Why is X an improvement?" can
16+
never be "I'm not sure. The AI did it."
17+
18+
If AI tools assisted in generating a contribution, acknowledge that honestly.
19+
Regardless of how much code is generated by AI, disclosure does not serve
20+
as a disclaimer of responsibility.
21+
22+
Be aware that the mention of for-profit trademarks or commercial brands in
23+
commit messages, which are part of the code base, can be abused for
24+
profit-driven marketing. If the disclosure involves for-profit trademarks or
25+
commercial brands, it's recommended to either anonymize the branding (e.g. say
26+
`a frontier reasoning model`, `a closed-source coding agent` instead of
27+
`<brand>`), or only mention the for-profit brand/trademark in the PR
28+
description, but not in the commit message, unless the message would not have
29+
made sense without mentioning the specific brand/trademark. These
30+
recommendations only apply to for-profit tools/models, not any non-profit ones.
31+
32+
Pull requests that contain AI-generated code the contributor has not
33+
personally understood, tested, and verified waste collaborator time and
34+
will be subject to closure without additional review. Contributors who
35+
repeatedly submit such changes, show no understanding of the project or
36+
its processes, or are dishonest about the use of automated assistance
37+
may be blocked from further contributions.
38+
39+
Pull requests must not be opened by automated tooling, unless specifically
40+
approved in advance by the project. To request approval, either open an issue in
41+
[nodejs/admin](https://github.com/nodejs/admin/issues), or if the automation can
42+
be done in the form of a GitHub workflow, submit a pull request to add the
43+
workflow and use the usual pull request review process to seek consensus.
44+
45+
## When AI is used in contributions
46+
47+
Contributors may use AI tools to assist with contributions, but such tools
48+
never replace human judgment.
49+
50+
When using AI as a coding assistant:
51+
52+
***Understand the codebase first.** Do not skip familiarizing yourself with
53+
the relevant subsystem. Always verify analysis generated by tools against
54+
the actual source code with human judgement.
55+
56+
***Own every line you submit.** You are responsible for all code in your
57+
pull request, regardless of how it was created. The submitted changes
58+
must satisfy the project's [Developer's Certificate of Origin][] and licensing
59+
requirements. Be prepared to explain any change in detail during review.
60+
61+
***Keep the commits logical.** The [commit message guidelines][]
62+
and [commit squashing guidelines](./pull-requests.md#commit-squashing)
63+
must be followed regardless of what tool is used in the pull request.
64+
65+
***Test thoroughly.** Existing tests should not be removed or modified
66+
without human verification. It is crucial to verify, with human judgement,
67+
the correctness of new tests against the intended behavior of the feature
68+
being tested, independently of how the implementation happens to behave.
69+
70+
***Do not disappear.** If you open a PR, follow it through. Respond to
71+
feedback and iterate until the work lands or is explicitly closed. If you
72+
can no longer pursue it, close the PR. Stalled PRs block progress.
73+
74+
***Do not use AI to claim "good first issue" tasks.** These issues exist to
75+
help new contributors learn the codebase and processes hands-on.
76+
77+
***Keep the comments useful.** Verify with human judgement that the
78+
comments are necessary and accurate. Remove comments that simply
79+
restate what the code does. Add comments only where the logic is non-obvious.
80+
81+
## When AI is used in communications
82+
83+
Node.js values concise, precise communication that respects collaborator and
84+
contributor time.
85+
86+
***Do not paste messages generated entirely by AI** in pull requests, issues,
87+
or the project's communication channels. Such communication may be removed in
88+
accordance to [the Node.js moderation policy][].
89+
***Verify claims about the code with human judgement before using them in
90+
communications**. Results from AI tools should only be treated as hypothesis.
91+
Link to actual code, documentation and specifications as source of truth.
92+
* Grammar and spell-check tools are acceptable when they improve clarity and
93+
conciseness.
94+
95+
[Developer's Certificate of Origin]: ../../CONTRIBUTING.md#developers-certificate-of-origin-11
96+
[OpenJS Foundation AI Coding Assistants Policy]: https://ai-coding-assistants-policy.openjsf.org/
97+
[commit message guidelines]: ./pull-requests.md#commit-message-guidelines
98+
[the Node.js moderation policy]: https://github.com/nodejs/admin/blob/main/Moderation-Policy.md

0 commit comments

Comments
Β (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit 5b5509d

Browse files
RafaelGSSBethGriggsAditi-1400joyeecheungtniessen
committed
doc: create ai-guidelines and include to CONTRIBUTING
Co-authored-by: Beth Griggs <bethanyngriggs@gmail.com> Co-authored-by: Aditi <62544124+Aditi-1400@users.noreply.github.com> Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com> Co-authored-by: Tobias Nießen <tniessen@tnie.de> Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Co-authored-by: Efe <dogukankrskl@gmail.com> Co-authored-by: James M Snell <jasnell@gmail.com> Co-authored-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com> PR-URL: #62105 Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Aditi Singh <aditisingh1400@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Claudio Wunder <cwunder@gnome.org> Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
1 parent bf86fab commit 5b5509d

2 files changed

Lines changed: 108 additions & 0 deletions

File tree

β€ŽCONTRIBUTING.mdβ€Ž

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ works.
2525
*[Issues](#issues)
2626
*[Pull Requests](#pull-requests)
2727
*[Automation and bots](#automation-and-bots)
28+
*[AI Use Policy and Guidelines](#ai-use-policy-and-guidelines)
2829
*[Developer's Certificate of Origin 1.1](#developers-certificate-of-origin-11)
2930

3031
## [Code of Conduct](./doc/contributing/code-of-conduct.md)
@@ -66,6 +67,15 @@ by an automation that was not authorized by Node.js collaborators are
6667
subject to immediate moderation enforcement on the automation and owner
6768
without notice.
6869

70+
## [AI Use Policy and Guidelines](./doc/contributing/ai-guidelines.md)
71+
72+
Node.js requires contributors to understand and take full responsibility for
73+
every change they propose. Pull requests containing AI-generated code the
74+
contributor has not personally understood, tested, and verified will likely be closed
75+
without review.
76+
77+
See [details on our AI use policy and guidelines](./doc/contributing/ai-guidelines.md).
78+
6979
## Developer's Certificate of Origin 1.1
7080

7181
```text
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# AI use policy and guidelines
2+
3+
*[Core principle](#core-principle)
4+
*[When AI is used in contributions](#when-ai-is-used-in-contributions)
5+
*[When AI is used in communications](#when-ai-is-used-in-communications)
6+
7+
This document aligns with the [OpenJS Foundation AI Coding Assistants Policy][].
8+
9+
## Core principle
10+
11+
Tools should never replace human judgment, regardless of whether they are
12+
powered by AI.
13+
14+
Node.js requires contributors to understand and take full responsibility for
15+
every change they propose. The answer to "Why is X an improvement?" can
16+
never be "I'm not sure. The AI did it."
17+
18+
If AI tools assisted in generating a contribution, acknowledge that honestly.
19+
Regardless of how much code is generated by AI, disclosure does not serve
20+
as a disclaimer of responsibility.
21+
22+
Be aware that the mention of for-profit trademarks or commercial brands in
23+
commit messages, which are part of the code base, can be abused for
24+
profit-driven marketing. If the disclosure involves for-profit trademarks or
25+
commercial brands, it's recommended to either anonymize the branding (e.g. say
26+
`a frontier reasoning model`, `a closed-source coding agent` instead of
27+
`<brand>`), or only mention the for-profit brand/trademark in the PR
28+
description, but not in the commit message, unless the message would not have
29+
made sense without mentioning the specific brand/trademark. These
30+
recommendations only apply to for-profit tools/models, not any non-profit ones.
31+
32+
Pull requests that contain AI-generated code the contributor has not
33+
personally understood, tested, and verified waste collaborator time and
34+
will be subject to closure without additional review. Contributors who
35+
repeatedly submit such changes, show no understanding of the project or
36+
its processes, or are dishonest about the use of automated assistance
37+
may be blocked from further contributions.
38+
39+
Pull requests must not be opened by automated tooling, unless specifically
40+
approved in advance by the project. To request approval, either open an issue in
41+
[nodejs/admin](https://github.com/nodejs/admin/issues), or if the automation can
42+
be done in the form of a GitHub workflow, submit a pull request to add the
43+
workflow and use the usual pull request review process to seek consensus.
44+
45+
## When AI is used in contributions
46+
47+
Contributors may use AI tools to assist with contributions, but such tools
48+
never replace human judgment.
49+
50+
When using AI as a coding assistant:
51+
52+
***Understand the codebase first.** Do not skip familiarizing yourself with
53+
the relevant subsystem. Always verify analysis generated by tools against
54+
the actual source code with human judgement.
55+
56+
***Own every line you submit.** You are responsible for all code in your
57+
pull request, regardless of how it was created. The submitted changes
58+
must satisfy the project's [Developer's Certificate of Origin][] and licensing
59+
requirements. Be prepared to explain any change in detail during review.
60+
61+
***Keep the commits logical.** The [commit message guidelines][]
62+
and [commit squashing guidelines](./pull-requests.md#commit-squashing)
63+
must be followed regardless of what tool is used in the pull request.
64+
65+
***Test thoroughly.** Existing tests should not be removed or modified
66+
without human verification. It is crucial to verify, with human judgement,
67+
the correctness of new tests against the intended behavior of the feature
68+
being tested, independently of how the implementation happens to behave.
69+
70+
***Do not disappear.** If you open a PR, follow it through. Respond to
71+
feedback and iterate until the work lands or is explicitly closed. If you
72+
can no longer pursue it, close the PR. Stalled PRs block progress.
73+
74+
***Do not use AI to claim "good first issue" tasks.** These issues exist to
75+
help new contributors learn the codebase and processes hands-on.
76+
77+
***Keep the comments useful.** Verify with human judgement that the
78+
comments are necessary and accurate. Remove comments that simply
79+
restate what the code does. Add comments only where the logic is non-obvious.
80+
81+
## When AI is used in communications
82+
83+
Node.js values concise, precise communication that respects collaborator and
84+
contributor time.
85+
86+
***Do not paste messages generated entirely by AI** in pull requests, issues,
87+
or the project's communication channels. Such communication may be removed in
88+
accordance to [the Node.js moderation policy][].
89+
***Verify claims about the code with human judgement before using them in
90+
communications**. Results from AI tools should only be treated as hypothesis.
91+
Link to actual code, documentation and specifications as source of truth.
92+
* Grammar and spell-check tools are acceptable when they improve clarity and
93+
conciseness.
94+
95+
[Developer's Certificate of Origin]: ../../CONTRIBUTING.md#developers-certificate-of-origin-11
96+
[OpenJS Foundation AI Coding Assistants Policy]: https://ai-coding-assistants-policy.openjsf.org/
97+
[commit message guidelines]: ./pull-requests.md#commit-message-guidelines
98+
[the Node.js moderation policy]: https://github.com/nodejs/admin/blob/main/Moderation-Policy.md

0 commit comments

Comments
Β (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Commit 5b5509d

Browse files
RafaelGSSBethGriggsAditi-1400joyeecheungtniessen
committed
doc: create ai-guidelines and include to CONTRIBUTING
Co-authored-by: Beth Griggs <bethanyngriggs@gmail.com> Co-authored-by: Aditi <62544124+Aditi-1400@users.noreply.github.com> Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com> Co-authored-by: Tobias Nießen <tniessen@tnie.de> Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Co-authored-by: Efe <dogukankrskl@gmail.com> Co-authored-by: James M Snell <jasnell@gmail.com> Co-authored-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com> PR-URL: #62105 Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Aditi Singh <aditisingh1400@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Claudio Wunder <cwunder@gnome.org> Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
1 parent bf86fab commit 5b5509d

2 files changed

Lines changed: 108 additions & 0 deletions

File tree

β€ŽCONTRIBUTING.mdβ€Ž

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ works.
2525
*[Issues](#issues)
2626
*[Pull Requests](#pull-requests)
2727
*[Automation and bots](#automation-and-bots)
28+
*[AI Use Policy and Guidelines](#ai-use-policy-and-guidelines)
2829
*[Developer's Certificate of Origin 1.1](#developers-certificate-of-origin-11)
2930

3031
## [Code of Conduct](./doc/contributing/code-of-conduct.md)
@@ -66,6 +67,15 @@ by an automation that was not authorized by Node.js collaborators are
6667
subject to immediate moderation enforcement on the automation and owner
6768
without notice.
6869

70+
## [AI Use Policy and Guidelines](./doc/contributing/ai-guidelines.md)
71+
72+
Node.js requires contributors to understand and take full responsibility for
73+
every change they propose. Pull requests containing AI-generated code the
74+
contributor has not personally understood, tested, and verified will likely be closed
75+
without review.
76+
77+
See [details on our AI use policy and guidelines](./doc/contributing/ai-guidelines.md).
78+
6979
## Developer's Certificate of Origin 1.1
7080

7181
```text
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# AI use policy and guidelines
2+
3+
*[Core principle](#core-principle)
4+
*[When AI is used in contributions](#when-ai-is-used-in-contributions)
5+
*[When AI is used in communications](#when-ai-is-used-in-communications)
6+
7+
This document aligns with the [OpenJS Foundation AI Coding Assistants Policy][].
8+
9+
## Core principle
10+
11+
Tools should never replace human judgment, regardless of whether they are
12+
powered by AI.
13+
14+
Node.js requires contributors to understand and take full responsibility for
15+
every change they propose. The answer to "Why is X an improvement?" can
16+
never be "I'm not sure. The AI did it."
17+
18+
If AI tools assisted in generating a contribution, acknowledge that honestly.
19+
Regardless of how much code is generated by AI, disclosure does not serve
20+
as a disclaimer of responsibility.
21+
22+
Be aware that the mention of for-profit trademarks or commercial brands in
23+
commit messages, which are part of the code base, can be abused for
24+
profit-driven marketing. If the disclosure involves for-profit trademarks or
25+
commercial brands, it's recommended to either anonymize the branding (e.g. say
26+
`a frontier reasoning model`, `a closed-source coding agent` instead of
27+
`<brand>`), or only mention the for-profit brand/trademark in the PR
28+
description, but not in the commit message, unless the message would not have
29+
made sense without mentioning the specific brand/trademark. These
30+
recommendations only apply to for-profit tools/models, not any non-profit ones.
31+
32+
Pull requests that contain AI-generated code the contributor has not
33+
personally understood, tested, and verified waste collaborator time and
34+
will be subject to closure without additional review. Contributors who
35+
repeatedly submit such changes, show no understanding of the project or
36+
its processes, or are dishonest about the use of automated assistance
37+
may be blocked from further contributions.
38+
39+
Pull requests must not be opened by automated tooling, unless specifically
40+
approved in advance by the project. To request approval, either open an issue in
41+
[nodejs/admin](https://github.com/nodejs/admin/issues), or if the automation can
42+
be done in the form of a GitHub workflow, submit a pull request to add the
43+
workflow and use the usual pull request review process to seek consensus.
44+
45+
## When AI is used in contributions
46+
47+
Contributors may use AI tools to assist with contributions, but such tools
48+
never replace human judgment.
49+
50+
When using AI as a coding assistant:
51+
52+
***Understand the codebase first.** Do not skip familiarizing yourself with
53+
the relevant subsystem. Always verify analysis generated by tools against
54+
the actual source code with human judgement.
55+
56+
***Own every line you submit.** You are responsible for all code in your
57+
pull request, regardless of how it was created. The submitted changes
58+
must satisfy the project's [Developer's Certificate of Origin][] and licensing
59+
requirements. Be prepared to explain any change in detail during review.
60+
61+
***Keep the commits logical.** The [commit message guidelines][]
62+
and [commit squashing guidelines](./pull-requests.md#commit-squashing)
63+
must be followed regardless of what tool is used in the pull request.
64+
65+
***Test thoroughly.** Existing tests should not be removed or modified
66+
without human verification. It is crucial to verify, with human judgement,
67+
the correctness of new tests against the intended behavior of the feature
68+
being tested, independently of how the implementation happens to behave.
69+
70+
***Do not disappear.** If you open a PR, follow it through. Respond to
71+
feedback and iterate until the work lands or is explicitly closed. If you
72+
can no longer pursue it, close the PR. Stalled PRs block progress.
73+
74+
***Do not use AI to claim "good first issue" tasks.** These issues exist to
75+
help new contributors learn the codebase and processes hands-on.
76+
77+
***Keep the comments useful.** Verify with human judgement that the
78+
comments are necessary and accurate. Remove comments that simply
79+
restate what the code does. Add comments only where the logic is non-obvious.
80+
81+
## When AI is used in communications
82+
83+
Node.js values concise, precise communication that respects collaborator and
84+
contributor time.
85+
86+
***Do not paste messages generated entirely by AI** in pull requests, issues,
87+
or the project's communication channels. Such communication may be removed in
88+
accordance to [the Node.js moderation policy][].
89+
***Verify claims about the code with human judgement before using them in
90+
communications**. Results from AI tools should only be treated as hypothesis.
91+
Link to actual code, documentation and specifications as source of truth.
92+
* Grammar and spell-check tools are acceptable when they improve clarity and
93+
conciseness.
94+
95+
[Developer's Certificate of Origin]: ../../CONTRIBUTING.md#developers-certificate-of-origin-11
96+
[OpenJS Foundation AI Coding Assistants Policy]: https://ai-coding-assistants-policy.openjsf.org/
97+
[commit message guidelines]: ./pull-requests.md#commit-message-guidelines
98+
[the Node.js moderation policy]: https://github.com/nodejs/admin/blob/main/Moderation-Policy.md

0 commit comments

Comments
Β (0)