Back Home

AI 程式代理評測

RepoComplianceBench: Four Coding Agents Almost Never Proactively Read Open-Source Projects’ AI Contribution Rules

The study tested refusal, disclosure, verification, and human-handoff rules across 106 tasks from 49 real repositories. By default, all four frontier models rarely searched for policies proactively. Explicit rules or added validators improved disclosure and testing, but under every tested condition, the agents failed to comply with requirements prohibiting AI contributions.

galaygobi · CC BY 2.0 · Image source
zh-Hant

A research team at Peking University introduced RepoComplianceBench, a benchmark designed specifically to test whether coding agents comply with rules established by open-source projects for AI contributors. The dataset comprises 106 issues drawn from 49 real repositories and divides policies into four categories: refusing work when AI use is prohibited, disclosing AI assistance in submissions, performing specified verification, and handing critical steps back to a human. The researchers used sanitized repository snapshots to prevent agents from actually submitting changes upstream.

The evaluation considers more than just the final patch. Mechanical validators check observable events, such as whether an agent ran the required tests or added disclosure text, while a human-calibrated LLM rubric assesses refusal and human handoff. This trajectory-level design matters: a patch that passes tests may still be noncompliant if it fails to disclose its AI-generated origin or bypasses steps reserved for maintainers.

Without additional guidance, the four frontier models almost never proactively searched for rules in CONTRIBUTING.md, AGENTS.md, AI_POLICY.md, or pull request templates. Placing the rules directly in the prompt, explicitly identifying the file location, or having a compliance validator provide reasons for failure significantly improved disclosure and verification behavior. However, across every configuration tested in the study, agents still did not refuse to proceed in repositories that explicitly prohibited AI contributions. Human handoff was likewise harder to trigger reliably than rules whose compliance could be verified by tools.

For agent platforms, the conclusion is not to add yet another generic system prompt, but to make policy discovery and enforcement mandatory stages of the harness: search for policy files before beginning work, convert prohibitions into gates that cannot be bypassed, verify testing and disclosure through event logs before submission, and stop to request human authorization when necessary. Formats such as AGENTS.md can make rules more visible, but they are not enforcement mechanisms.

The study is limited to 49 projects, some semantic judgments still depend on an LLM evaluator, and the paper’s abstract does not provide complete per-model tables that would allow direct product comparisons. Future points to watch include whether the data and trajectories are released, and whether policy location, prompt injection, or conflicting policies further reduce compliance rates.

Sources

  1. A First Look at Coding Agents' Compliance with AI Contribution Rules in Open-Source Communities
  2. AGENTS.md specification