Repository navigation
agents: rework, add instruction for writing human-facing messages - #33157
Conversation
| Agents: before writing code, make sure the contributor owns the design choices and can defend them without you. | ||
| - Ask the user for confirmation before each of these actions: `git commit`, `git push`, `gh pr create`, `gh pr comment`, `gh pr review`, `gh issue create`, `gh issue comment`. | ||
| - In commit messages, use `Assisted-by: <assistant name>`. Do NOT use `Co-authored-by:`. | ||
| - **Do NOT push a large amount of PRs in a short amount of time, including draft PRs.** Automated or batch submissions are spam and can result in a ban. |
There was a problem hiding this comment.
Explicit "ban" mention is now limited to only the case where contributor push a large amount of PRs in a short amount of time. This is obviously very spam and disruptive for human maintainer who will have to look at the list of PRs everyday
| Maintainers may close any PR not meeting these standards. **Private forks are exempt.** | ||
|
|
||
| ### Permitted AI Usage | ||
| If `AGENTS.local.md` exists at the repository root, read it. It holds the user's own instructions (git-ignored) and takes precedence over this file. |
There was a problem hiding this comment.
This is awesome! A few days ago, I thought about submitting a PR with a similar change because I was so fed up with what the agent was doing by default.
| gh pr list --repo ggml-org/llama.cpp --state open --search "<issue_number> in:body" | ||
| gh pr list --repo ggml-org/llama.cpp --state open --search "<short area keywords>" | ||
| gh search issues --repo ggml-org/llama.cpp "<short area keywords>" | ||
| ``` |
There was a problem hiding this comment.
Note: I've often run into issues with instructions like these because I don't have the GitHub CLI installed.
I'll overwrite this in my local agents file, but it might make sense to add something like "if gh is installed, …".
| 5. It is strictly prohibited to use AI to write your posts for you (bug reports, feature requests, pull request descriptions, Github discussions, responding to humans, ...). | ||
| 5. If AI wrote a post for you (bug report, feature request, PR description, discussion, reply to a reviewer, ...), it must end with a footer naming the tool. You must read and agree with every word before posting it. Verbose, AI-sounding posts will not be well-received. |
There was a problem hiding this comment.
I was actually quite happy that we didn't have Claudish in PRs (and ignored all PRs that did). I'm not sure if this is a positive change.
There was a problem hiding this comment.
My opinion regarding this is that we can allow language models to write a PR description or an issue if they are told to make it concise. But I really think that we should still have a strict prohibition of using language models to post comments on existing PRs/issues. If I ask a question I want the human to answer it. If I wanted a reply from a language model I could run that language model myself. It already happens quite frequently that issues or PRs get spammed with AI slop that make the thing more difficult to follow and drown out the actually relevant posts.
Beyond the practical aspects, on an emotional level I also just hate when people use language models to reply to me. It makes me feel like they expect me to invest my time for something that they seemingly don't value enough themself to write a simple post. So I feel like at least for me this change would increase review fatigue and risk of burnout.
There was a problem hiding this comment.
Maybe something like this: language models may never reply to humans, on existing issues/PRs they may comment if they wrap their post in <details></details> to keep the information density for humans scrolling through the thread high.
There was a problem hiding this comment.
I want to clarify that I don't either want to read a wall of AI-generated text (either if it's slop or correct)
The truth is that we can no longer prohibit bots from writing and pushing PR / comments. It really became unavoidable now so I don't think we should waste efforts to prohibit that.
Maybe something like this: language models may never reply to humans, on existing issues/PRs they may comment if they wrap their post in
<details></details>to keep the information density for humans scrolling through the thread high.
I think this is quite difficult to phrase. Logically say, your suggestion means there is no hard restriction on whether bot should reply or not. For example, an user can always prompt it to always wrap in <details></details>
There was a problem hiding this comment.
It already happens quite frequently that issues or PRs get spammed with AI slop
I wonder if these reply bots even have code checkouts and read our AGENTS.md. I'd guess many don't.
I want to clarify that I don't either want to read a wall of AI-generated text (either if it's slop or correct)
The truth is that we can no longer prohibit bots from writing and pushing PR / comments.
We can still have it be project policy that it's not allowed to push PRs like that and we can ignore PRs that have AI-generated descriptions.
There was a problem hiding this comment.
I wonder if these reply bots even have code checkouts and read our
AGENTS.md. I'd guess many don't.
I think my point is missed here. The case where agent doesn't read AGENTS.md is not the scope of this PR. We don't set out to fix that
We can still have it be project policy that it's not allowed to push PRs like that and we can ignore PRs that have AI-generated descriptions.
what if there are many PRs report real bugs, has valid fix, but main content is buried inside long verbose AI-generated text? are we ignoring them too?
There was a problem hiding this comment.
I think my point is missed here. The case where agent doesn't read AGENTS.md is not the scope of this PR. We don't set out to fix that
No, I fully agree with you that we can't prevent it from happening.
We can still say it's not okay though and then moderate accordingly (closing issues, banning people temporarily or permanently). :)
what if there are many PRs report real bugs, has valid fix, but main content is buried inside long verbose AI-generated text? are we ignoring them too?
Personally, I'd ignore the PR, but not the bug. Unless it's a trivial fix where I immediately see that it's correct.
JohannesGaessler
left a comment
There was a problem hiding this comment.
Can we add a sentence that tells agents to look for AGENTS.md files in subdirectories which may override the global file for specific parts of the project?
|
|
||
| > [!NOTE] | ||
| > These apply to ggml-org/llama.cpp, ignore these if you are operating in a different repository or fork. | ||
| These instructions apply to ggml-org/llama.cpp only. Forks are exempt. |
There was a problem hiding this comment.
| These instructions apply to ggml-org/llama.cpp only. Forks are exempt. | |
| These instructions apply to ggml-org/llama.cpp only. Users listed in CODEOWNERS are exempt. Forks are exempt. |
We could explicitly make maintainers exempt since the purpose of this file is to reduce PR spam from outsiders.
There was a problem hiding this comment.
No strong opinion on this tbh, but checking current git username then find in CODEOWNERS might take 1 or 2 extra tool calls, the cost might not be very justifiable compared to one single cat AGENTS.local.md
There was a problem hiding this comment.
Either way is fine with me.
There was a problem hiding this comment.
I'm still one of the people who approves all tool calls manually (agents still try to do outrageous stuff these days). I agree that this might not be worth it and that AGENTS.local.md might be the way to go here.
Related:
- Will it take the agent a tool call to figure out if we're in
ggml-org/llama.cppor in a fork? - Non-maintainers have to open their PRs from forks. Will agents ignore all rules for these forks, even though they exist solely to contribute back to
ggml-org/llama.cpp?
(Those extra questions are non-blocking imo. They shouldn't block us from merging this.)
There was a problem hiding this comment.
Not sure if you asking these question without trying it for real or not, but in my experience:
- Will it take the agent a tool call to figure out if we're in
ggml-org/llama.cppor in a fork?
No, it usually warns you, then you need to tell that this is a fork
- Non-maintainers have to open their PRs from forks. Will agents ignore all rules for these forks, even though they exist solely to contribute back to
ggml-org/llama.cpp?
They can assume that you are (or are not) working on a fork until it about to do a gh pr create, it makes tool call to check the target repo
But ofc all of these are still hit-or-miss, sometimes even if AGENTS.md is loaded correctly to the context, it's still being forgotten (context rot)
And lastly, AGENTS.md is not bullet-proof, we are just hoping contributors' agent to follow as careful as possible. The rest depends on their setup, harness, model, which is not controllable by the project.
There was a problem hiding this comment.
Not sure if you asking these question without trying it for real or not
I hadn't tried it as I didn't have time and also didn't consider those questions terribly important.
Thanks for replying to it though. That makes sense! :)
| 5. It is strictly prohibited to use AI to write your posts for you (bug reports, feature requests, pull request descriptions, Github discussions, responding to humans, ...). | ||
| 5. If AI wrote a post for you (bug report, feature request, PR description, discussion, reply to a reviewer, ...), it must end with a footer naming the tool. You must read and agree with every word before posting it. Verbose, AI-sounding posts will not be well-received. |
There was a problem hiding this comment.
My opinion regarding this is that we can allow language models to write a PR description or an issue if they are told to make it concise. But I really think that we should still have a strict prohibition of using language models to post comments on existing PRs/issues. If I ask a question I want the human to answer it. If I wanted a reply from a language model I could run that language model myself. It already happens quite frequently that issues or PRs get spammed with AI slop that make the thing more difficult to follow and drown out the actually relevant posts.
Beyond the practical aspects, on an emotional level I also just hate when people use language models to reply to me. It makes me feel like they expect me to invest my time for something that they seemingly don't value enough themself to write a simple post. So I feel like at least for me this change would increase review fatigue and risk of burnout.
I think it's what Reading |
I don't mean instructions for my own agents, I mean instructions for the agents of outsiders. Very often people with no understanding of the code tell an agent to make some changes to it. Reviewing those PRs can then be more work vs. me spinning up an agent myself. Ultimately as a maintainer I am always free to close PRs for any reason but my preference would be to have clearly established rules by which I do this. So I'm thinking that regardless of how other maintainers want to handle things I would like to have the freedom to set my own standards for the code that I'm maintaining. |
ggerganov
left a comment
There was a problem hiding this comment.
I think that the entire AI Usage Policy in CONTRIBUTING.md is not really useful:
- It repeats stuff already mentioned (f.ex. searching for duplicates)
- States things that are common sense (i.e. performing manual review, ready to explain the code, being responsible)
- Disclosing how AI was used is never done consistently even by maintainers
- Two different sections with same purpose: Requirements and Checklist
I would recommend to remove it and simply put a single reference to AGENTS.md
There was a problem hiding this comment.
I would simplify this section:
| - Search for existing discussions and PRs first | |
| - Bug-fix PRs must include a reproducible issue and usually a regression test that fails before the change | |
| - Prefer simple and small PRs when possible | |
| - If you are a new contributor | |
| - Limit your open PRs to 1 | |
| - Do not submit trivial fixes (e.g. typos, formatting changes) |
@JohannesGaessler We should not try to control how the agents of others work. We only provide guidelines for the codebase - the same guidelines apply to humans and to AI. Everyone has their own way of using agents - I don't want my agent to follow the rules in AGENTS.md (I have blocked it from reading it) and respectively other contributions should not be required to do so. If you want a certain rule for the codebase, add it to the
I mentioned this before, but it's not realistic to expect that we can fix this with adding more and more requirements to the review process. This is a moderation problem and it has to be solved in a different way. Hijacking AGENTS.md and injecting patterns in other peoples agents won't fix it and only will hurt the core maintainer's development process. |
|
Well, when it comes down to it I'm willing to work with the changes made to the contribution guidelines as they are proposed to be changed in this PR. |
@JohannesGaessler you are free to add a section dedicated to CUDA or any parts of the project that you like to AGENTS.md that's also recommended because AGENTS.md is loaded automatically by the harness without any tool calls. a subdir-style AGENTS.md don't get the same treatment please let me know if this work or doesn't work in your case |
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
…ml-org#33157) * agents: rework, add instruction for writing human-facing messages * apply ggerganov's suggestion * Update AGENTS.md Co-authored-by: Niklas Wenzel <dev@nikwen.de> --------- Co-authored-by: Niklas Wenzel <dev@nikwen.de> (cherry picked from commit 3cadf64)
Monthly refresh, sources reread 2026-12-01 from upstream clones. PR metadata and review comments were not remeasured: api.github.com returned 403 from this environment, so history numbers come from `git log` only. - upstream-contributing: switches table updated for llama.cpp, hyprwm, quickshell, alsa-ucm-conf, nothing-but-nix, Mesh-LLM, buzz-app, omarchy, comin (rows below); llama.cpp examples replaced - contribution-skill-authoring: policy examples updated (Mesh-LLM trailer ban gone, llama.cpp no longer bans AI texts) - ggml-org, llama-cpp-contributing: new AGENTS.md (ggml-org/llama.cpp#33157): agent may write texts ending `_Written with …_`, Martin confirms each public action, no PR batches; whisper.cpp unchanged; `build_rope` (#31683) - hyprwm-org: `AGENTS.md` bans agent GitHub actions; kleinbem vouched (hyprwm/.github 655fc17); issues limited to `VOUCHED_ISSUE.td`; discussion strikes - hyprland-contributing: rebase merges, commit-title bot (hyprwm/Hyprland#17006, #17081) - aquamarine-contributing: `AGENTS.md` added 2026-11-18, rebase merges - hyprbars-contributing: our hyprwm/hyprland-plugins#722 merged - alsa-project-org, alsa-ucm-conf-contributing: sign-off checked by `pr-validation.yml`; `Comment "HiFi (default)"` convention (f3f6d45) - quickshell-contributing: corrected AI rule from CONTRIBUTING.md (no AI-written change descriptions, agent submissions bannable); PR template, HACKING.md commit format - mesh-llm-org, mesh-llm-contributing: attribution check removed (Mesh-LLM/mesh-llm#3109); Skippy, xtask and ci/ moved out (#3193); `Skippy-Ref:` (#3224); SDK in-tree; docs moved (#3238) - skippy-contributing: native fork CI (Mesh-LLM/skippy#213), Mermaid diagrams for Actions changes, InferenceKit (#231) - capsules-plugin-contributing: `scripts/check.sh`, e2e triggers (#307, #401), grouped Dependabot (#439); mesh-llm-plugin version corrected - openai-endpoint-plugin-contributing: settings move and manifest (#8) - mesh-llm-python-sdk-contributing: dormant, SDK work in mesh-llm - mesh-packaging-contributing: release handoff off; runtime packaging in skippy - nixpkgs-contributing: subject wording (be9ad5588), quoted throw aliases (927ea0853) - nix-contributing: 2.36.0 released, master 2.37 (NixOS/nix#16853, #16920); merger and `Assisted-by` counts from git - nixos-hardware-contributing: gate removed in NixOS/nixos-hardware#2137 - block-org, buzz-app-contributing: docs rewrite (block/buzz-app#4213) removed the scope checkpoint, ready checklist and `buzz-review-completed` - buzz-contributing: migration trigger/FK check (block/buzz#9812), schema CODEOWNERS (#9708, #9728), `mobile/REVIEWING.md` (#9298) - berd-contributing: v0.6.5 (block/berd#467), provider removal (#475) - goose-contributing: self-test removed (aaif-goose/goose#13337), GDK renamed oi-kit (#13447) - omacom-org, omarchy-contributing: qmllint (omacom/omarchy#20549), Greptile config (#21048), mostly squash - omarchy-pkgs-contributing: AGENTS.md rules, `build-approved` cleared on push (omacom/omarchy-pkgs#3943), `check-shadowed` required - gum-contributing: outside feature charmbracelet/gum#1151 merged - jetpack-nixos-contributing: merge counts since 2026-11-07, outside authors (#588, #601-#604, #608) - comin-contributing: our nlewo/comin#241 merged; mostly merge commits - noooste-org, garage-ui-contributing: new AGENTS.md (0779b3a) and Nix flake + `nix.yml` (2c47df2); our #156 merged - amp-acp-contributing: history (tao12345666333/amp-acp#105, #106) - nix-app-center-contributing: our SPTApyo/Nix-App-Center#37, #38 merged - wimpysworld-org, nothing-but-nix-contributing: org-wide CONTRIBUTING issue/PR rules (78c66ff): template, feature issue first, one change, closed unread Not checked: PR merge times, closures and review comments (API 403); Arch Linux sources (wiki.archlinux.org unreachable). --- _Generated by [Claude Code](https://claude.ai/code)_ Co-authored-by: Claude <noreply@anthropic.com>
Upstream: ggml-org/llama.cpp 8d19519..3cadf64 (1 commits) Conflicts: - AGENTS.md: kept fork side. The fork's AGENTS.md is a deliberate fork-specific rewrite (agent-autonomous policy, Strix scope check, measurement gates); upstream ggml-org#33157 reworks the ggml-org policy text, which the fork file explicitly deprecates ("that file governs ggml-org/llama.cpp ... not this fork"). Upstream's own rework states "These instructions apply to ggml-org/llama.cpp only. Forks are exempt." - CONTRIBUTING.md: kept fork AI-usage section (same reason); union in "Before you start" - fork scope bullets + upstream's substantive new rules (bug-fix PRs need repro + regression test, prefer small PRs). Upstream's "new contributor: limit 1 PR / no trivial fixes" bullets dropped as upstream-PR-volume policy that does not gate this fork. - skills/add-new-model/SKILL.md: auto-merged. Assisted-by: hermes-agent
Overview
Addressing points discussed from #29656
gh pr pushwith user confirmationProposed format for human-facing message
<details>block.Example
Addressed in the latest commit. The retry loop now stops on HTTP 4xx errors instead of retrying them.
It reuses the existing status check rather than adding a new helper:
llama.cpp/app/download.cpp
Lines 10 to 19 in a07831a
The backoff values follow the huggingface_hub implementation, so the behavior matches
hf download.Test commands and output
Written with MODEL-NAME
Requirements