Skip to content

meta: add a root-level AGENTS.md - #65493

Open
jasnell wants to merge 4 commits into
nodejs:mainfrom
jasnell:jasnell/agents-md
Open

meta: add a root-level AGENTS.md#65493
jasnell wants to merge 4 commits into
nodejs:mainfrom
jasnell:jasnell/agents-md

Conversation

@jasnell

@jasnell jasnell commented Aug 22, 2026

Copy link
Copy Markdown
Member

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.

@jasnell
jasnell requested a review from a team August 22, 2026 23:03
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. meta Issues and PRs related to the general management of the project. labels Aug 22, 2026
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 <jasnell@gmail.com>
@jasnell
jasnell force-pushed the jasnell/agents-md branch from ed9ce39 to 37e80dd Compare August 22, 2026 23:07
Comment thread AGENTS.md Outdated
@jasnell jasnell added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Aug 22, 2026
@jasnell jasnell added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Aug 23, 2026
@cjihrig
cjihrig requested a review from BethGriggs August 23, 2026 00:35
@legendecas

Copy link
Copy Markdown
Member

There is an ealier PR for AGENTS.md: #65463

Comment thread AGENTS.md

@MikeMcC399 MikeMcC399 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

#62612 disabled linting for AGENTS.md. Consider re-enabling, then re-formatting and responding to linting findings. I noticed because #65463 from @BethGriggs had done this.

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md
Comment thread AGENTS.md Outdated
@joyeecheung

joyeecheung commented Aug 23, 2026

Copy link
Copy Markdown
Member

The document uses a tone as if it's speaking to a human, even though it is not supposed to be read by human? e.g. the distinction of collaborators or non-collaborators is pointless to an agent unless you give it permisssions where the distinction makes a difference, but then the document goes on saying the agent shouldn't use any of these permissions, which means the agent is not supposed to make use of that distinction in the first place.

Co-authored-by: Brian Muenzenmeyer <brian.muenzenmeyer@gmail.com>
Comment thread AGENTS.md Outdated
@jasnell
jasnell requested a review from mcollina August 23, 2026 20:35
@jasnell

jasnell commented Aug 23, 2026

Copy link
Copy Markdown
Member Author

The document uses a tone as if it's speaking to a human, even though it is not supposed to be read by human? e.g. the distinction of collaborators or non-collaborators is pointless to an agent unless you give it permisssions where the distinction makes a difference, but then the document goes on saying the agent shouldn't use any of these permissions, which means the agent is not supposed to make use of that distinction in the first place.

Agents are perfectly capable of correctly interpretting it as written.

image

@aduh95

aduh95 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Please apply the following diff to address #65493 (review):

diff --git a/AGENTS.md b/AGENTS.md
index 71f4b5e254f..84a22a2d51c 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -1,46 +1,60 @@
 # Agents and Automated Tools
 
-This document outlines rules and requirements for AI automation agents and automated tooling that interact with the Node.js project.
+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.
+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.
+* **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.
+* **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 Node.js's continuous integration. Human judgment must verify that existing tests are not removed or modified inappropriately, and that new tests correctly validate the intended behavior.
+* **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: <your name> (<your email>)` as an attestation to the [Developer Certificate of Origin](https://developercertificate.org/).
-- AI-assistance must be acknowledged using the `Assisted-by: <agent name>` annotation.
-- AI-authored code contributions must be compatible with the project's licensing and contribution guidelines.
+* All commits must be signed off by the human user using `Signed-off-by: <your name> (<your email>)`
+  as an attestation to the [Developer Certificate of Origin](https://developercertificate.org/).
+* AI-assistance must be acknowledged using the `Assisted-by: <agent name>` 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: <agent-name>` 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: <agent name>` or `Co-authored-by: <agent name>`
+* 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: <agent-name>` 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: <agent name>` or `Co-authored-by: <agent name>`.
 
 ## 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
 
----
+* 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).
+***
+
+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 10292db04e8..113a203d250 100644
--- a/Makefile
+++ b/Makefile
@@ -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))

Or I'm happy to do it for you if you prefer

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

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. doc Issues and PRs related to the documentations. meta Issues and PRs related to the general management of the project.

Projects

None yet

Development

Successfully merging this pull request may close these issues.