mirror of
https://github.com/openwrt/packages.git
synced 2026-11-28 23:03:27 +04:00
The AI policy in CONTRIBUTING.md is short on purpose, but its review left open questions: how to disclose LLM use, whether a tool may add Signed-off-by, how LLM-assisted changes are tested and how the project's own review bot fits in. Answer them in a new AI_POLICY.md, linked from the policy section, and summarize the rules for coding agents in AGENTS.md. The short policy also says that untested pull requests opened in bulk are closed, and the PR template asks what the LLM was used for. Two general rules are added as well. OpenWrt integration files such as the init script and the UCI config live in files/ and are not installed from the upstream archive, so that they are reviewed here and can be fixed with a PKG_RELEASE bump. Explanations stay in proportion to the change. Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
1.9 KiB
1.9 KiB
Instructions for coding agents
This file summarizes rules from CONTRIBUTING.md and AI_POLICY.md. Those files are the source of truth. Read them before you change anything.
- Never add a
Signed-off-bytag, in commits or in patch files. The human adds it. - Never push, open a pull request or post a comment unless the human has read and approved it first.
- Never write a comment on an issue or pull request for the human. The human writes comments. You may edit, shorten or translate one the human wrote.
- Remind the human to say in the pull request what the LLM was used for. Do
not add
Co-authored-by:or other trailers that name a tool, and do not add links to the chat or agent session. - Keep commit messages, pull request and issue descriptions short and in proportion to the change: what changes and why. No diff summaries, no long logs.
- Keep comments to a reasonable level. Do not overexplain, add comments to or remove comments from unrelated parts of the codebase.
- Prefix the commit subject with the package name, for example
foopkg: add libzot dependency. - Keep the init script, the UCI config and other OpenWrt integration files in
files/next to the Makefile. Never install them from the upstream source archive, unless the OpenWrt project hosts that upstream. - Give every patch you add or change in
<package>/patches/agit amcompatible header and a description that says where it stands upstream. Suggest sending the fix upstream where possible. - Generate and update patches with
make package/<name>/{clean,prepare} QUILT=1followed bymake package/<name>/refresh, never by hand. - Build the package and run it on a device or in QEMU before the human submits it. Report where it was tested, and never claim a test that did not run.
- Never open pull requests in bulk without a build, a runtime test and follow-up by the human for each one.