Просмотр исходного кода

Closes #23420: Introduce a written AI policy (#23437)

Adopt the Human Voice policy (v1.0.0) from ai-policy.dev as
AI_POLICY.md, and reference it from CONTRIBUTING.md, AGENTS.md, and the
PR template.
Jeremy Stretch 3 часов назад
Родитель
Сommit
9f8b55c196
4 измененных файлов с 45 добавлено и 1 удалено
  1. 1 0
      .github/PULL_REQUEST_TEMPLATE.md
  2. 8 0
      AGENTS.md
  3. 34 0
      AI_POLICY.md
  4. 2 1
      CONTRIBUTING.md

+ 1 - 0
.github/PULL_REQUEST_TEMPLATE.md

@@ -4,6 +4,7 @@
 
       1. An issue has been opened to capture these changes
       2. The issue has been accepted and assigned to you for work
+      3. Your PR complies with our AI policy (see AI_POLICY.md)
 
     Pull requests which do not reference an assigned issue will be closed
     automatically. Please specify your assigned issue number on the line below.

+ 8 - 0
AGENTS.md

@@ -266,6 +266,14 @@ GitHub Actions workflows in `.github/workflows/`:
 - **Extras**: Cross-cutting features (custom fields, tags, webhooks, scripts) belong in the `extras` app.
 - **Plugin API**: Only documented public APIs are stable. Internal code may change without notice.
 
+## AI Policy
+
+All contributions must comply with the project's [AI policy](AI_POLICY.md). In short:
+
+- AI tools may be used to explore the codebase and to generate code.
+- The contributor must fully understand, and be able to explain, every change submitted.
+- Issues, pull request descriptions, and comments must be written in the contributor's own voice. Anything you draft for these is a starting point for the contributor to review and rewrite: keep it brief and plain, and say so when handing it over.
+
 ## Branch & PR Conventions
 
 - Branch naming: `<issue-number>-short-description` (e.g., `1234-device-typerror`)

+ 34 - 0
AI_POLICY.md

@@ -0,0 +1,34 @@
+# AI Contribution Policy
+
+This project **welcomes the thoughtful use of AI tools** when contributing, yet asks all contributors to follow two core principles.
+
+## Never let an LLM speak for you
+
+When maintainers read a comment, an issue, or a pull request from you, they want to know they are hearing your words. Grammar and spelling do not matter. What matters is real connection.
+
+- All comments, issues, and pull request descriptions should be written in your own voice
+- We value clear, human communication over perfect grammar or spelling
+- Avoid copy-pasting AI-generated summaries that don't reflect your own understanding
+
+AI-generated summaries tend to be long-winded, dense, and often inaccurate. Simplicity is an art. The goal is not to sound impressive, but to communicate clearly.
+
+## Never let an LLM think for you
+
+Go ahead and use AI to explore the codebase, or to write the function or test you need. But the final step before contributing should always be understanding what it has written.
+
+- Feel free to use AI tools to generate code or explore ideas
+- Only submit contributions you fully understand and can explain
+- Contributions should reflect your own reasoning and problem-solving
+
+Use AI to point you in the right direction, but always take personal responsibility. Do not quote an LLM in an issue or pull request. Maintainers want to know what you think.
+
+Our aim is ensuring quality and maintaining the joy of collaborating and communicating with real people.
+
+## Summary
+
+- AI may be used to generate code or explore ideas
+- Comments, issues, and pull request descriptions must be written in your own voice
+- Contributions must be fully understood and explainable by the contributor
+- Contribution guidelines must still be followed
+
+This policy is based on the [Human Voice policy, version 1.0.0](https://ai-policy.dev/policies/human-voice/1.0.0) from 2026-09-23. Read more about this and other AI contribution policies on [ai-policy.dev](https://ai-policy.dev/).

+ 2 - 1
CONTRIBUTING.md

@@ -38,7 +38,7 @@ NetBox users are welcome to participate in either role, on stage or in the crowd
 > We do not currently accept issues submitted via GitHub's API: All issues must be submitted using one of the [provided templates](https://github.com/netbox-community/netbox/issues/new/choose). In addition to ensuring high-quality submissions, these templates automatically assign issue types and labels for categorization to help expedite triage. This does not happen when issues are submitted via the API.
 
 > [!IMPORTANT]
-> Every issue submitted to this repository is afforded consideration by a human reviewer. To mitigate abuse, we ask that users refrain from submitting AI-generated issues. Please note that issues which appear to be completely authored by an AI may be rejected without further discussion.
+> Every issue submitted to this repository is afforded consideration by a human reviewer. Please review our [AI policy](AI_POLICY.md) before contributing: While AI tools may be used to help write code, all issues, pull request descriptions, and comments must be written in your own words. Issues which appear to be completely authored by an AI may be rejected without further discussion.
 
 ## :bug: Reporting Bugs
 
@@ -98,6 +98,7 @@ intake policy](https://github.com/netbox-community/netbox/wiki/Issue-Intake-Poli
 
 * All code submissions must meet the following criteria (CI will enforce these checks where feasible):
   * Consist entirely of original work
+  * Comply with our [AI policy](AI_POLICY.md)
   * Python syntax is valid
   * All tests pass when run with `NETBOX_CONFIGURATION=netbox.configuration_testing ./manage.py test`
   * `ruff check` successfully validates style compliance