[PR #7014] [MERGED] [misc] add AGENTS.md file #29437

Closed
opened 2026-08-05 08:08:04 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/7014
Author: @mlsmaycon
Created: 7/31/2026
Status: Merged
Merged: 7/31/2026
Merged by: @mlsmaycon

Base: mainHead: add-agents-guidance


📝 Commits (3)

📊 Changes

3 files changed (+545 additions, -0 deletions)

View changed files

AGENTS.md (+514 -0)
CLAUDE.md (+1 -0)
📝 CONTRIBUTING.md (+30 -0)

📄 Description

Describe your changes

#7009 wrote down what we expect
from a contribution: an agreed ticket first, a change the author has run, one
purpose per PR, small enough to review, a title tag CI already enforces. That
works for contributors who read CONTRIBUTING.md.

A growing share of what reaches the queue is drafted by a coding agent, and those
tools never read it. The result is predictable and repetitive: a PR with no ticket
behind it, an approach we would have talked the author out of in five minutes, a
diff too large to review carefully against a daemon that runs as root, a
description longer than the code it describes, and an author who cannot answer
questions about their own change. That is not a tooling problem. It is what
happens when a capable tool is pointed at a repository whose expectations nobody
told it.

AGENTS.md states those expectations in the format agents pick up automatically.
The first entry in its stop-and-ask list is asking the contributor for the
discussion or issue before drafting anything, which is where most of these PRs
go wrong. It also carries the repository map, the Go conventions we apply in
review, the local verification commands, the PR template and title-tag rules,
and instructions to read the review bots rather than resolve their threads.

CONTRIBUTING.md gains a short section saying plainly that we have no policy for
or against agents, that this guide exists because of what we keep seeing rather
than as a restriction on tools, and that whatever produced a diff its author owns
it. It also records that we weigh whether a contribution is worth maintaining,
and that what gets merged has to match our security and design expectations.

CLAUDE.md is a one-line pointer rather than a symlink, deliberately. A symlink is
tidier, but a Windows checkout without symlink support materialises it as a plain
file containing the target path, and an agent then reads one word as its entire
instruction set with no error to show for it. Given how much Windows work this
repository sees, a pointer file that survives every checkout is worth the extra
file.

Nothing here is enforced by CI, and no workflow changes. It is guidance, aimed at
PRs arriving in a reviewable state more often.

Follows up on #7009, which
established the ticket-first flow this builds on.

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • I ran and tested this change locally — I did not rely on CI to find out whether it works
  • This PR has a single purpose (not a fix + refactor + feature in one)
  • This change is a trivial fix, OR it links an issue the NetBird team agreed on beforehand. Changes to the public API, gRPC protocols, functionality behavior, CLI / service flags, or new features always need that agreement first. See CONTRIBUTING.md.

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

Summary by CodeRabbit

  • Documentation
    • Added comprehensive repository development guidelines covering setup, testing, security, coding practices, releases, and contribution workflows.
    • Added guidance for using AI coding tools, including author responsibility and review expectations.
    • Linked existing contributor guidance to the new development documentation.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/7014 **Author:** [@mlsmaycon](https://github.com/mlsmaycon) **Created:** 7/31/2026 **Status:** ✅ Merged **Merged:** 7/31/2026 **Merged by:** [@mlsmaycon](https://github.com/mlsmaycon) **Base:** `main` ← **Head:** `add-agents-guidance` --- ### 📝 Commits (3) - [`164d62f`](https://github.com/netbirdio/netbird/commit/164d62f3a57728f93ad63c2d91b5c7fbe5aa284a) [misc] add AGENTS.md file - [`8947d01`](https://github.com/netbirdio/netbird/commit/8947d0132fc9de5bcb78c6906f7e07ff397353c4) update wording - [`8f5fcf9`](https://github.com/netbirdio/netbird/commit/8f5fcf99d4f58216c6a6e1b054443bfc87b106cc) address comments ### 📊 Changes **3 files changed** (+545 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `AGENTS.md` (+514 -0) ➕ `CLAUDE.md` (+1 -0) 📝 `CONTRIBUTING.md` (+30 -0) </details> ### 📄 Description ## Describe your changes [#7009](https://github.com/netbirdio/netbird/pull/7009) wrote down what we expect from a contribution: an agreed ticket first, a change the author has run, one purpose per PR, small enough to review, a title tag CI already enforces. That works for contributors who read CONTRIBUTING.md. A growing share of what reaches the queue is drafted by a coding agent, and those tools never read it. The result is predictable and repetitive: a PR with no ticket behind it, an approach we would have talked the author out of in five minutes, a diff too large to review carefully against a daemon that runs as root, a description longer than the code it describes, and an author who cannot answer questions about their own change. That is not a tooling problem. It is what happens when a capable tool is pointed at a repository whose expectations nobody told it. AGENTS.md states those expectations in the format agents pick up automatically. The first entry in its stop-and-ask list is asking the contributor for the discussion or issue before drafting anything, which is where most of these PRs go wrong. It also carries the repository map, the Go conventions we apply in review, the local verification commands, the PR template and title-tag rules, and instructions to read the review bots rather than resolve their threads. CONTRIBUTING.md gains a short section saying plainly that we have no policy for or against agents, that this guide exists because of what we keep seeing rather than as a restriction on tools, and that whatever produced a diff its author owns it. It also records that we weigh whether a contribution is worth maintaining, and that what gets merged has to match our security and design expectations. CLAUDE.md is a one-line pointer rather than a symlink, deliberately. A symlink is tidier, but a Windows checkout without symlink support materialises it as a plain file containing the target path, and an agent then reads one word as its entire instruction set with no error to show for it. Given how much Windows work this repository sees, a pointer file that survives every checkout is worth the extra file. Nothing here is enforced by CI, and no workflow changes. It is guidance, aimed at PRs arriving in a reviewable state more often. ## Issue ticket number and link Follows up on [#7009](https://github.com/netbirdio/netbird/pull/7009), which established the ticket-first flow this builds on. <!-- Required for anything that changes behavior. Link the issue (or the validated discussion it came from) that the NetBird team already agreed on. See https://github.com/netbirdio/netbird/blob/main/CONTRIBUTING.md#ticket-first-pr-second --> ## Stack <!-- branch-stack --> ### Checklist - [ ] Is it a bug fix - [x] Is a typo/documentation fix - [ ] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] I ran and tested this change locally — I did not rely on CI to find out whether it works - [x] This PR has a single purpose (not a fix + refactor + feature in one) - [x] This change is a trivial fix, **OR** it links an issue the NetBird team agreed on beforehand. Changes to the public API, gRPC protocols, functionality behavior, CLI / service flags, or new features always need that agreement first. See [CONTRIBUTING.md](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTING.md#ticket-first-pr-second). > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (explain why) ### Docs PR URL (required if "docs added" is checked) Paste the PR link from https://github.com/netbirdio/docs here: https://github.com/netbirdio/docs/pull/__ <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added comprehensive repository development guidelines covering setup, testing, security, coding practices, releases, and contribution workflows. * Added guidance for using AI coding tools, including author responsibility and review expectations. * Linked existing contributor guidance to the new development documentation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 08:08:04 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#29437