From b59d0abc521ecf37e1d5cb0da756da2ffcf9f60d Mon Sep 17 00:00:00 2001 From: James M Snell Date: Sat, 22 Aug 2026 23:01:29 +0000 Subject: [PATCH 1/3] meta: add a root-level AGENTS.md We're seeing a number of repeated mistakes in AI-generated contributions, including agents using `Signed-off-by`, creating what appear to be unsupervised PRs, appearing to respond to comments without human oversight, etc. Having an AGENTS.md file with specific instructions to the agent on what to avoid should help. Signed-off-by: James M Snell --- .gitignore | 1 - AGENTS.md | 64 +++++++++++++++++++++++++++++++++++++++++++++++ Makefile | 4 +-- eslint.config.mjs | 2 +- 4 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 AGENTS.md diff --git a/.gitignore b/.gitignore index 69c1dd205316..2a7ce3337021 100644 --- a/.gitignore +++ b/.gitignore @@ -163,7 +163,6 @@ install_manifest.txt # === Rules for AI assistants === CLAUDE.md -AGENTS.md # === Global Rules === # Keep last to avoid being excluded diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000000..ea2d223cb864 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,64 @@ +# Agents and Automated Tools + +This document outlines rules and requirements for AI automation agents and automated +tooling that interact with the Node.js project. + +Existing Node.js collaborators (as listed in the README.md) may use AI agents to +contribute but must do so responsibly. + +New Node.js contributors should avoid using AI agents to interact with the project. + +## Code Contributions + +* **No unreviewed automation**: Automated pull requests must not be created without + ongoing human oversight. The pull request must be actively maintained by a human + contributor who responds to feedback. The AI agent is not permitted to create pull + requests, open issues, post comments, respond to reviews, or push commits without + ongoing human oversight. + +* **Commit responsibility**: Commits created with agent assistance must follow all + Node.js [commit message guidelines](./doc/contributing/pull-requests.md#commit-message-guidelines). + The human contributor opening the PR takes full responsibility for the changes. + +* **Testing and verification**: All changes must pass the Node.js continuous integration. + Human judgment must verify that existing tests are not removed or modified inappropriately, + and that new tests correctly validate the intended behavior. + +### Requirements + +* All commits must be signed off by the human user using `Signed-off-by: ()` + as an attestation to the [Developer Certificate of Origin](https://developercertificate.org/). +* AI-assistance must be acknowledged using the `Assisted-by: ` annotation. +* AI-authored code contributions must be compatible with the project's licensing and + contribution guidelines. + +## Prohibited Activities + +AI agents **must not**: + +* Push to any branch or tag in nodejs/node +* Create unsupervised pull requests or issues without active human engagement +* Make claims about code without human verification against actual source code +* Remove or modify existing tests without human judgment +* Interact with the repository through means other than those explicitly authorized +* Use commit messages to promote for-profit AI tools or commercial brands. A single + `Assisted-by: ` annotation is required disclosure, not promotion, and is + permitted. +* Post AI-generated messages directly into pull requests, issues, or project communication + channels without direct human review and editing to ensure clarity, accuracy, and respect + for collaborator time +* Sign off commits using `Signed-off-by: ` or `Co-authored-by: ` + +## Violations + +Automated interactions that violate these rules may result in: + +* Immediate closure of pull requests without review +* Blocking of the automation tool from further interaction with the project +* Blocking of the tool's account or its owner from contributing +* Reports to relevant platforms or organizations operating the automation + +*** + +For more information on AI use in general contributions (not specific to agents), +see [AI use policy and guidelines](./doc/contributing/ai-guidelines.md). diff --git a/Makefile b/Makefile index 10292db04e8c..4da0900c6fca 100644 --- a/Makefile +++ b/Makefile @@ -1288,7 +1288,7 @@ ifneq ($(SKIP_SHARED_DEPS), 1) cp doc/node.1 $(TARNAME)/doc/node.1 cp -r out/doc/api/* $(TARNAME)/doc/api/ endif - sed 's/fileset = fileset.intersection (fileset.gitTracked root)/fileset =/' tools/nix/v8.nix > $(TARNAME)/tools/nix/v8.nix + sed 's/fileset = fileset.intersection (fileset.gitTracked root)/fileset =/' tools/nix/v8.nix > $(TARNAME)/tools/nix/v8.nix $(RM) -r $(TARNAME)/.editorconfig $(RM) -r $(TARNAME)/.git* $(RM) -r $(TARNAME)/.mailmap @@ -1480,7 +1480,7 @@ else LINT_MD_NEWER = -newer tools/.mdlintstamp endif -LINT_MD_TARGETS = doc src lib benchmark test tools/doc tools/icu $(filter-out CLAUDE.md AGENTS.md,$(wildcard *.md)) +LINT_MD_TARGETS = doc src lib benchmark test tools/doc tools/icu $(filter-out CLAUDE.md,$(wildcard *.md)) LINT_MD_FILES = $(shell $(FIND) $(LINT_MD_TARGETS) -type f \ ! -path '*node_modules*' ! -path 'test/fixtures/*' -name '*.md' \ $(LINT_MD_NEWER)) diff --git a/eslint.config.mjs b/eslint.config.mjs index c59d447589c1..c19e8f3cf46e 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -401,7 +401,7 @@ export default [ // #region markdown config { files: ['**/*.md'], - ignores: ['CLAUDE.md', 'AGENTS.md'], + ignores: ['CLAUDE.md'], plugins: { markdown, }, From 792c745b3ad0cc98440e5ddbcd7c5adb01311032 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Mon, 24 Aug 2026 07:10:51 -0700 Subject: [PATCH 2/3] Update AGENTS.md Co-authored-by: Antoine du Hamel --- AGENTS.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index ea2d223cb864..c3ec8c644c55 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -53,10 +53,10 @@ AI agents **must not**: Automated interactions that violate these rules may result in: -* Immediate closure of pull requests without review -* Blocking of the automation tool from further interaction with the project -* Blocking of the tool's account or its owner from contributing -* Reports to relevant platforms or organizations operating the automation +* Immediate closure of pull requests without review. +* Blocking of the automation tool from further interaction with the project. +* Blocking of the tool's account or its owner from contributing. +* Reports to relevant platforms or organizations operating the automation. *** From 30617f66e59a05354db13572ccbf046967fee6ec Mon Sep 17 00:00:00 2001 From: James M Snell Date: Mon, 24 Aug 2026 07:11:03 -0700 Subject: [PATCH 3/3] Update AGENTS.md Co-authored-by: Antoine du Hamel --- AGENTS.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index c3ec8c644c55..79e1d1b688b8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -36,18 +36,18 @@ New Node.js contributors should avoid using AI agents to interact with the proje AI agents **must not**: -* Push to any branch or tag in nodejs/node -* Create unsupervised pull requests or issues without active human engagement -* Make claims about code without human verification against actual source code -* Remove or modify existing tests without human judgment -* Interact with the repository through means other than those explicitly authorized +* Push to any branch or tag in nodejs/node. +* Create unsupervised pull requests or issues without active human engagement. +* Make claims about code without human verification against actual source code. +* Remove or modify existing tests without human judgment. +* Interact with the repository through means other than those explicitly authorized. * Use commit messages to promote for-profit AI tools or commercial brands. A single `Assisted-by: ` annotation is required disclosure, not promotion, and is permitted. * Post AI-generated messages directly into pull requests, issues, or project communication channels without direct human review and editing to ensure clarity, accuracy, and respect - for collaborator time -* Sign off commits using `Signed-off-by: ` or `Co-authored-by: ` + for collaborator time. +* Sign off commits using `Signed-off-by: ` or `Co-authored-by: `. ## Violations