Strengthen the AI assistance policy in CONTRIBUTING.md with contribution gates
We already have an AI Assistance Notice in `CONTRIBUTING.md`. The problem is that it's a norm with no gate: more PRs land where the diff is model-generated and the author can't explain it, and review threads get answered with generated text that misses the point, so the first-pass review falls on maintainers.
Below is a small set of enforceable additions on top of what we have, drawn from kagent, agent-substrate, NVIDIA OpenShell, and upstream Kubernetes. It keeps disclosure and does not ban AI.
Proposed additions
Keep the existing AI Assistance Notice. Add the following.
-
Author-understanding gate with a stated consequence. If a maintainer asks how a change works and the author cannot explain it, the PR is closed. Repeated cases lead to interaction limits. (OpenShell, Kubernetes)
-
Tests must be run on real GPU hardware before submitting. For any change affecting scheduling decisions, device allocation, or in-container isolation, unit tests and mocked devices are not sufficient. The author validates the change on real GPU hardware and records in the PR what was tested and on which device and driver. A PR that touches device behavior with no evidence of real-hardware testing is not accepted. (HAMi-specific; aligns with the Kubernetes rule to verify before you submit)
-
Cap on model-generated scope. Large AI-generated PRs are not accepted. Anything beyond a small fix starts as an issue and is split into reviewable commits. AI-generated commit messages are not accepted; write your own. (Kubernetes)
-
Review replies in your own words. AI may help you understand a comment. The reply you post must be written by you and must address the specific point. Verbatim or canned AI replies, or replies that do not engage the comment, lead to the PR being closed. (Kubernetes)
-
Commit trailer hygiene. No AI listed as co-author, no `assisted-by`, `co-developed`, or similar trailers, no AI co-signing. Disclosure belongs in the PR description. (Kubernetes)
-
Entry step for brand-new accounts. Before a first large PR, a first-time contributor opens a short Discussion describing, in their own words, what they intend to change and why. Good first issues are exempt. (OpenShell)
-
Issue-first for non-trivial changes. Features, refactors, and any change to scheduler, webhook, or device-plugin behavior start as an issue with a short design and maintainer agreement before a full PR. Draft PRs are welcome for feedback. (kagent, agent-substrate)
-
Enforcement surface. Add a label for PRs blocked on unexplained or undisclosed AI use (suggested: `needs/author-understanding`), and enable stale automation so PRs with no author engagement close after a set window. OpenShell uses 14 days to stale and 7 more to close; Kubernetes closes at 90 days. (OpenShell, Kubernetes)
Open questions for maintainers
- Cap large model-generated diffs and require issue-first for non-trivial changes?
- How strict on review replies, from "write it yourself" up to the Kubernetes rule of no AI in review responses at all?
Prior art
- HAMi: https://github.com/Project-HAMi/HAMi/blob/master/CONTRIBUTING.md
- Kubernetes: https://www.kubernetes.dev/docs/guide/pull-requests/#ai-guidance
- NVIDIA OpenShell: https://github.com/NVIDIA/OpenShell/blob/main/CONTRIBUTING.md
- agent-substrate: https://github.com/agent-substrate/substrate/blob/main/COLLABORATING.md
- kagent: https://github.com/kagent-dev/kagent/blob/main/CONTRIBUTING.md
cc @archlitchi @chaunceyjiang @DSFans2014 @fouof @lengrongfu @ouyangluwei163 @wawa0210 @shouren @rootsongjc @fishman -- what do you think about these additions? Which items make sense for HAMi, and are there any you would drop or adjust?
我们的 CONTRIBUTING.md 里已经有一份 AI Assistance Notice。问题在于它只是一条约定,却没有任何强制关卡:越来越多的 PR,diff 是模型生成的,而作者无法解释这些改动;review 里也常常用生成的文字来回复,却答非所问。结果第一遍 review 的负担就落到了 maintainer 身上。
下面是在现有基础上补充的一小组可执行条款,参考了 kagent、agent-substrate、NVIDIA OpenShell 和上游 Kubernetes 的做法。它保留了披露要求,并不禁止使用 AI。
建议新增条款
保留现有的 AI Assistance Notice,并新增以下内容。
-
作者理解关卡,且有明确后果。 如果 maintainer 询问某处改动的原理,而作者无法解释,该 PR 将被关闭。多次出现将导致 interaction limits。(OpenShell, Kubernetes)
-
提交前必须在真实 GPU 硬件上测试。 对于任何影响调度决策、设备分配或容器内隔离的改动,单元测试和 mock 设备都不够。作者需在真实 GPU 硬件上验证改动,并在 PR 中记录测试了什么、在哪种设备和 driver 上测试。凡涉及设备行为却没有真实硬件测试证据的 PR,不予接受。(HAMi 特有;与 Kubernetes “提交前先验证” 的规则一致)
-
限制模型生成的规模。 不接受大型的 AI 生成 PR。超出小修改范围的改动,需先开 issue,并拆分为可 review 的多个 commit。不接受 AI 生成的 commit message,请自己写。(Kubernetes)
-
用你自己的话回复 review。 AI 可以帮你理解某条评论,但你发出的回复必须由你本人撰写,并针对具体问题。原样粘贴或套模板的 AI 回复,或答非所问的回复,会导致 PR 被关闭。(Kubernetes)
-
规范 commit trailer。 不得将 AI 列为 co-author,不得使用
assisted-by、co-developed或类似 trailer,不得用 AI 进行 co-sign。披露信息应写在 PR description 里。(Kubernetes) -
新账号的准入步骤。 首次贡献者在提交第一个大型 PR 之前,先开一个简短的 Discussion,用自己的话说明打算改什么、为什么改。good first issue 除外。(OpenShell)
-
非琐碎改动先开 issue。 新功能、重构,以及任何改动 scheduler、webhook 或 device-plugin 行为的改动,都应先开 issue,附上简短设计并获得 maintainer 认可,然后再提完整 PR。欢迎用 draft PR 获取反馈。(kagent, agent-substrate)
-
落地执行手段。 为因“无法解释”或“未披露 AI 使用”而卡住的 PR 加一个 label(建议:
needs/author-understanding),并启用 stale 自动化,让作者长期无回应的 PR 在设定的时间窗后自动关闭。OpenShell 是 14 天转 stale、再 7 天关闭;Kubernetes 是 90 天关闭。(OpenShell, Kubernetes)
想请 maintainer 讨论的问题
- 是否限制大型模型生成 diff,并要求非琐碎改动先开 issue?
- review 回复要多严格?从“自己写”一直到 Kubernetes “review 回复完全不允许用 AI” 的程度,取哪一档?
参考先例
- HAMi: https://github.com/Project-HAMi/HAMi/blob/master/CONTRIBUTING.md
- Kubernetes: https://www.kubernetes.dev/docs/guide/pull-requests/#ai-guidance
- NVIDIA OpenShell: https://github.com/NVIDIA/OpenShell/blob/main/CONTRIBUTING.md
- agent-substrate: https://github.com/agent-substrate/substrate/blob/main/COLLABORATING.md
- kagent: https://github.com/kagent-dev/kagent/blob/main/CONTRIBUTING.md
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
We already have an AI Assistance Notice in our CONTRIBUTING.md. The problem is that it is just a convention, but there is no mandatory level: more and more PRs and diffs are generated by models, and the author cannot explain these changes; reviews often use generated text to reply, but the answer is not the question. As a result, the burden of the first review falls on the maintainer.
The following is a small set of enforceable provisions that add to the existing foundation, drawing on the practices of kagent, agent-substrate, NVIDIA OpenShell, and upstream Kubernetes. It retains disclosure requirements and does not ban the use of AI.
Suggest new terms
Keep the existing AI Assistance Notice and add the following.
-
**The author understands the levels and has clear consequences. ** If the maintainer asks the rationale for a change and the author cannot explain it, the PR will be closed. Multiple occurrences will result in interaction limits. (OpenShell, Kubernetes)
-
**Must be tested on real GPU hardware before submission. ** Unit tests and mock devices are not sufficient for any changes that affect scheduling decisions, device allocation, or isolation within a container. The author needs to verify the changes on real GPU hardware and record in the PR what was tested and on which device and driver. PRs involving device behavior without evidence of real hardware testing will not be accepted. (HAMi specific; consistent with the Kubernetes “verify before committing” rule)
-
**Limit the scale of model generation. ** Large AI generated PRs will not be accepted. For changes beyond the scope of minor modifications, an issue must be opened first and split into multiple commits that can be reviewed. AI-generated commit messages are not accepted, please write your own. (Kubernetes)
-
**Reply to review in your own words. ** AI can help you understand a comment, but the reply you send must be written by you and address the specific question. Pasting or templated AI responses as they are, or responses that do not answer the question will result in the PR being closed. (Kubernetes)
-
**Specify commit trailer. ** AI may not be listed as co-author, may not use
assisted-by,co-developedor similar trailers, and may not co-sign with AI. Disclosure information should be written in the PR description. (Kubernetes) -
**Access steps for new accounts. ** Before submitting the first large PR, first-time contributors should open a brief Discussion to explain in their own words what they plan to change and why. Except for good first issue. (OpenShell)
-
**Open an issue first for non-trivial changes. ** New features, refactorings, and any changes that change the behavior of scheduler, webhook or device-plugin should first open an issue, attach a brief design and obtain the maintainer's approval, and then submit a full PR. Feel free to use draft PRs to get feedback. (kagent, agent-substrate)
-
** Implementation methods. ** Add a label to PRs that are stuck due to "unexplainable" or "undisclosed AI use" (suggestion:
needs/author-understanding), and enable stale automation so that PRs that the author has not responded to for a long time will be automatically closed after a set time window. OpenShell is stale in 14 days and shut down in 7 days; Kubernetes is shut down in 90 days. (OpenShell, Kubernetes)
I would like to ask maintainers to discuss issues
- Should we restrict diff generation for large models and require non-trivial changes to open an issue first?
- How strict should review responses be? From "Write it yourself" to Kubernetes "No AI is allowed for review replies", which level should I choose?
Reference precedent
- HAMi: https://github.com/Project-HAMi/HAMi/blob/master/CONTRIBUTING.md
- Kubernetes: https://www.kubernetes.dev/docs/guide/pull-requests/#ai-guidance
- NVIDIA OpenShell: https://github.com/NVIDIA/OpenShell/blob/main/CONTRIBUTING.md
- agent-substrate: https://github.com/agent-substrate/substrate/blob/main/COLLABORATING.md
- kagent: https://github.com/kagent-dev/kagent/blob/main/CONTRIBUTING.md
2. **Tests must be run on real GPU hardware before submitting.** For any change affecting scheduling decisions, device allocation, or in-container isolation, unit tests and mocked devices are not sufficient. The author validates the change on real GPU hardware and records in the PR what was tested and on which device and driver. A PR that touches device behavior with no evidence of real-hardware testing is not accepted. (HAMi-specific; aligns with the Kubernetes rule to verify before you submit)
@mesutoezdil A quick reply for this addition. I think not all tests should be run on real GPU hardware before submitting. As for scheduler extender, it is possible to test it without a real GPU or other devices.
I built a tool for exactly this "norm with no gate" problem.
It's a GitHub Action on pull_request: it checks whether the PR body contains a structured handoff packet, meaning the linked issue, the declared scope of the change, and the author's self-reported checks.
If the packet is missing or incomplete, the check fails mechanically, with instructions for the author. No maintainer time is spent until the declaration exists.
Two points that map to your issue: it is not an AI detector; it gates on whether a human took ownership of declaring the change, so "the author can't explain the diff" surfaces before review.
And it makes zero model calls at runtime, so it can't be argued with by generated text in the thread.
If this matches the gate you want, I can share the implementation.
Thanks @mesutoezdil , i think we should strictly enforce law 1-5 for now, we can have equally treatfirst-time contributers as long as they abide these rules. And i think we need to add another rule:
Remove AI-generated comments unless you think that comment is CRITICAL , there are too many reduntant ai-generated comments.
PR: #2019
Incorporates feedback from @Shouren and @archlitchi.
cc @archlitchi @chaunceyjiang @DSFans2014 @fouof @lengrongfu @ouyangluwei163 @wawa0210 @shouren @rootsongjc @fishman