Repository navigation
CONTRIBUTING.md: add AI policy #30782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,33 @@ prompts given to the automated LLM reviewer. | |
| - [Project-wide LLM review guidelines](https://github.com/openwrt/actions-shared-workflows/tree/main/llm-review-prompts) | ||
| - [Packages repository-specific LLM review addendum](https://github.com/openwrt/packages/blob/master/.github/llm-review-rules.md) | ||
|
|
||
| ## AI policy | ||
|
|
||
| > [!WARNING] | ||
| > You **must** disclose any LLM usage in your pull request, description or | ||
| > commit messages. | ||
|
|
||
| We support the use of LLMs for coding, but we hold a high bar for all | ||
| contributions, and we expect a human in the loop who genuinely understands the | ||
| work an LLM produces on their behalf. | ||
|
|
||
| > [!IMPORTANT] | ||
| > Don't rely on LLMs to write the whole thing for you when communicating with | ||
| > the maintainers, and don't post wall-of-text comments. | ||
|
|
||
| We expect comments on our projects to be written by humans. The readers are | ||
| humans, and we'd like to hear from you, not from a model. We may hide or remove | ||
| any comments that we believe are LLM-generated. | ||
|
Comment on lines
+42
to
+44
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The section just above (CONTRIBUTING.md:18-26) points contributors at the project's own automated LLM reviewer, which posts LLM-generated comments autonomously. This rule and the "no autonomous agents" one at line 43 read as covering it too. Should both say they apply to contributors, not to project-run review tooling? Generated by Claude Code
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @openwrt-ai No worries. :) You're our friend, we like you, and your reviews are really helpful. 👍 We'll make an exception for you. |
||
|
|
||
| If you're using an LLM to edit or – as a non-native English speaker – to | ||
| translate your comments, keep them short, review before posting, and make sure | ||
| they say what you mean. | ||
|
|
||
| > [!CAUTION] | ||
| > Do not use autonomous agents for contributing to our projects. | ||
|
|
||
| We will close any pull requests that we believe were created autonomously. | ||
|
|
||
| ## Package Sources (archives and repositories) | ||
|
|
||
| - <strong>PKG_SOURCE</strong> should reference the smallest available archive. In order of | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, the kernel merged similar guidelines for v7.0, and ~8 months later their removal was proposed: https://lore.kernel.org/lkml/20261009083137.3-1-sashal@kernel.org/
It's basically assumed that the majority of developers use LLMs these days. Shouldn't we rather steer the LLMs and make everyone's life easier? That likely means an AGENTS.md plus a few composable skills (openwrt-commit, openwrt-pull-request, openwrt-issue) that demand the appropriate content. Both are plain Markdown, so they work across harnesses (Codex, Copilot, Cursor, Gemini CLI, and Claude Code via a CLAUDE.md symlink).
To keep the human in the loop, AGENTS.md could tell the agent to add My human operator wasn't in the loop to every PR/issue body until the human explicitly approves it. If that line reaches GitHub, a check can label or auto-close the PR or issue.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example openwrt/openwrt#24500
...
Lets use the donated tokens in a way which works for this project.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was already addressed. The proposed requirement here is different and relates to AI usage in the "pull request, description or commit messages" - in other words, you must disclose any AI usage in your GitHub messages and written prose in the commit message, via a checkbox.
The purpose is to discourage autonomous agents like Openclaw that open PRs and act on a user's behalf without operator guidance, which has been a growing problem in the OpenWrt repos. It is not related to the code or functional contents of the patch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do those harnesses even read CONTRIBUTING.md? None load it automatically, only their own AGENTS.md/CLAUDE.md, and Claude Code was ignoring AGENTS.md until recently.
Checked OpenClaw (98bb32b): it doesn't read the target repo's CONTRIBUTING.md or PR template. Its gh skills open PRs with
gh pr create --body-fileand a hardcoded body, so the checkbox never shows up. If it delegates to Codex/Claude Code, those load the repo's AGENTS.md/CLAUDE.md.So AGENTS.md (+ CLAUDE.md symlink) plus a CI check that fails when the disclosure is missing would probably catch them better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does OpenWrt have to work around third-party tools' issues? And at which agent's, model's, harness's support do we draw the line? Why do we even need to enable drive-by contributions from people who neither read the basic guidelines, nor bother using the PR template?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ynezz's finding is valuable. I wouldn't want to be the one to maintain a tangle of AGENTS files either, but let's hold on to that and revisit if the problem persists. There's some attraction to keeping the bots away via their own mechanism rather than banning them as they pop up - as a moderate contributor I don't have the ability to ban or even close spam PRs right now and I lose time every day because spam PRs remain open perpetually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: The reference to OpenClaw doesn't work and points to openwrt/packages instead.
Honestly, seeing #30836 makes me just want to skip it without even reading it.