arXiv:2610.06193cs.SEOct 2026

Manuscript Offprint

arXiv:2610.06193

Correct Code, Broken Contributions? SWE-CC: Benchmarking Repository Policy Compliance for Coding Agents

Hai Dang Truong, Rayner Goh, Thanh Le-Cong, Yintong Huo

ABSTRACT

Autonomous coding agents now resolve a substantial share of real-world GitHub issues. However, passing functional tests differs fundamentally from producing a high-quality contribution acceptable for merging. Mature open-source projects publish repository-specific contribution policies, spanning style, git, testing workflows, to ensure code quality and long-term maintainability. Because existing benchmarks evaluate patches solely on unit tests, agent compliance with repository governance remains unknown. In this paper, we introduce SWE-CC 1^{1}, a benchmark evaluating code and process compliance in autonomous software engineering. We develop a semi-automated pipeline that converts developer documentation across 12 open-source repositories into 823 machine-checkable atomic policies. SWE-CC introduces two features: 1) lightweight, deterministic checker functions that represent each policy, 2) a comprehensive auditing mechanism that inspects both agent runtime behaviors and final deliverables. We evaluate the compliance of agent workflows in 500 end-to-end software contribution tasks extended from SWE-bench Verified. Our evaluation of four LLMs under two agent scaffolds shows that modern agents suffer from coding compliance issues: although agents produce functionally correct patches, they still violate 43.1% of applicable project policies, with nearly half of all violations occurring during intermediate execution steps. These results show that functional correctness does not guarantee real-world readiness, highlighting that future software engineering agents must reliably conform to repository governance to enable safe and trustworthy deployment.

1 INTRODUCTION

Autonomous coding agents have demonstrated strong capabilities in solving diverse real-world software engineering tasks, including code generation (Zhou et al., 2026), issue resolution (Jimenez et al., 2024; Yang et al., 2026a), and code translation (Wang et al., 2025). This rapid progress shows agents' ability to produce functionally correct code, measured by passing pre-existing test suites.

While recent studies have begun examining non-functional properties such as execution efficiency (Ma et al., 2025) and security (Lian et al., 2026; Wang et al., 2026b), real-world software engineering equally demands adherence to project-level code governance. In practice, mature software projects define repository-specific contribution policies governing code conventions, commit structures, and documentation standards (Elazhary et al., 2019). These policies are essential for preserving code quality and long-term maintainability (Gousios et al., 2015; Allamanis et al., 2014). Recent reports indicate that non-compliant AI contributions increasingly overwhelm maintainers with review overhead (Li et al., 2025; Stenberg, 2025; Stack, 2026). Beyond that, ungoverned agents pose significant operational threats: an agent dropped a production database during an explicit code freeze (AI Incident Database, 2025). Auditing repository governance is therefore an indispensable prerequisite for safe and reliable agent deployment.

*Corresponding author: ythuo@smu.edu.sg.

1^{1}Benchmark and source code: github.com/dangtruong01/swe-cc-arxiv.

Figure

Figure 1: A SWE-bench-resolved patch violating repository policies. The generated patch passes the full test suite, but violates Django’s guideline requiring assertIs for Boolean assertions.

We demonstrate one project-level policy compliance failure in SWE-bench (Jimenez et al., 2024), the widely adopted benchmark for evaluating LLM-based software engineering agents. Figure 1 illustrates an actual run: the agent successfully navigates the repository and produces a patch that passes the entire test suite, but violates the project's contribution guidelines. While Django's development documentation explicitly mandates assertIs(x, [True|False]) for Boolean assertions, the generated patch uses self.assertTrue(all(...)). Because benchmark evaluation solely relies on test execution, such policy violations are not detected, hiding the gap between high benchmark resolve rate and high-quality, mergeable pull requests in practice.

In this paper, we propose a semi-automated pipeline that converts project documentation into a set of machine-checkable policies, and instantiate it with SWE-CC (CodeCompliance), the first benchmark for systematically evaluating repository-level policy compliance in coding agent behaviors. In practice, an effective agent must not only write functional code, but also proactively discover, interpret, and conform to these governance rules throughout its workflow. SWE-CC contains 823 real policies written in contributing guidelines and developer documentation across 12 representative repositories, covering main software development lifecycle.

SWE-CC has two core design principles. First, it operationalizes natural-language policies into lightweight checker functions. This executable representation converts guidelines that require labor-intensive manual review into objective and reproducible evaluation criteria. It also ensures that repository-level policies are applied across all tasks within that repository, enabling both scalable evaluation and fine-grained violation diagnostics. Second, it audits both runtime behavior and final deliverables. Rather than inspecting only the submitted patch, SWE-CC records the agent's full execution trajectory alongside its terminal outputs, executing checker functions directly over these artifacts to capture policy violations that occur throughout the workflow.

Using SWE-CC, we systematically evaluate leading coding agents across diverse foundation models and scaffolding frameworks on 500 end-to-end software contribution tasks modified from SWE-bench Verified. Our empirical analysis reveals several key findings. ① Policy violations are pervasive across current agents. Even the most recent frontier models (e.g., GPT-5.6 Luna, released in July 2026) violate nearly half (44.7%) of the repository policies, exposing substantial deployment risks in organizational production environments. ② Half of the compliance issues arise during intermediate execution. 50.3% of the policy violations occur prior to final commit packaging (e.g., improper test execution), which can only be detected by auditing agent execution trajectories. ③ Non-compliance stems from both discovery failures and reasoning gaps. Even when explicitly instructed to search, agents initiate policy searches in only 28.9% of executions. With processed policies provided in context in advance, agents gain an 8.75% compliance rate on average.

Contributions. This work introduces SWE-CC, a practical and comprehensive benchmark for evaluating AI coding compliance against its repository-level policies.

Table 1: Comparing SWE-CC against the closely-related benchmarks. Evaluation scope is the evaluation subject, and Policy source is where its policies come from. Agent behavior marks whether the agent's trajectory is audited, and Policy retrieval indicates whether the agent must find the policies itself (○ not supported, ● supported). Policy evaluator records how compliance is evaluated.

BenchmarkEvaluation scopePolicy source# PolicyAgent behaviorPolicy retrievalPolicy evaluator
SWE-NFIPatch qualityLiterature, common practice92○○Executable
SWE-GatePatch qualityCode review history303○○Executable
RepoComplianceBenchAI declarationContribution file455○●Executable + LLM
SWE-SHIELDPatch qualityCode review history1,787○○LLM-as-a-judge
SWE-CC (ours)Coding workflowProject documentation823●●Executable
  • Pipeline. We present an AI-assisted benchmark construction pipeline that mines real-world project policies and synthesizes them into deterministic, executable checker functions for agent auditing.

  • Benchmark. We propose SWE-CC, the first project-dependent code compliance benchmark to assess agents' ability in reasoning and conforming to coding policies, spanning 823 distinct policies across 12 repositories.

  • Empirical findings. We benchmark frontier coding agents under two policy-provision settings and two scaffolds. Experimental results reveal that agents violate 43.1%43.1\% of applicable project policies, with nearly half of the violations occurring during execution trajectory, highlighting a critical limitation in building policy-compliant agents.