Coding agents better follow repository rules for contributions
Acquiring and Verifying Repository Norms for Coding Agents
Software Engineering
Summary
Coding programs can write code that works but might not follow all the rules a project requires. The authors created RepoNorm, a tool that helps these programs understand and check the specific rules of a software repository by gathering guidance from different parts of the project’s history and documents. Their tests showed that coding models using RepoNorm followed more of these rules and had higher success rates than those that didn’t. This helps create code changes that meet both technical and project-specific standards.
What this means in practice
- •For software development teams: Ensure automated coding tools produce code that meets project-specific contribution rules by integrating RepoNorm for norm verification.
- •For open source project maintainers: Use RepoNorm to check that contributions from coding agents follow the unique norms and requirements of their repositories before merging.
Authors
Kaifeng He, Xiaojun Zhang, Zhenxi Chen, Christoph Treude, Mingwei Liu
Abstract
Changes produced by coding agents can pass functional tests while leaving repository contribution requirements unmet. Following repository-specific norms requires identifying guidance dispersed across repository sources and interpreting its conditions and exceptions. Retrieval and documentation approaches supply general context, but agents must still determine which norms apply. We introduce RepoNorm to acquire explicit and implicit repository norms independently of coding tasks. It checks norm content and applicability using repository evidence, consults Git history when needed, and delivers norm packages to existing coding agents. Our evaluation uses three coding models and 121 tasks from RepoNormBench. Against the baseline with no additional generated guidance (Raw), relative improvements are 7.42-10.77% for Overall Norm Compliance Rate (NCR), 31.64-45.44% for Contribution NCR, and 11.34-17.69% for Prompt-omitted NCR. All three coding models also obtain higher values on these NCR measures with RepoNorm than with CodeWiki documentation. Functional success rates show observed gains of 5.79-9.09 percentage points over Raw; the paired comparisons do not reach the significance threshold. Sampled precision is 86% with RepoNorm's default configuration.