메뉴
HN
Hacker News 23일 전

코드 클린 코드, AI 코딩 에이전트 영향

IMP
7/10
핵심 요약

코드의 구조적, 스타일적 품질이 AI 코딩 에이전트의 성능에 미치는 영향을 분석한 연구가 발표되었습니다. 연구 결과, 코드의 청결도가 작업 성공률 자체는 변화시키지 않았으나, 깔끔한 코드에서 작업할 때 에이전트의 토큰 사용량을 7~8% 줄이고 파일 재탐색을 34% 감소시키는 등 연산 비용과 탐색 효율성을 크게 향상시키는 것으로 나타났습니다. 이는 AI 시대에도 전통적인 코드 유지보수 원칙이 여전히 중요함을 시사합니다.

번역된 본문

제목: 코드의 클린함은 코딩 에이전트에 영향을 미치는가? 제어된 최소 대립쌍 연구 저자: Priyansh Trivedi, Olivier Schmitt (SonarSource)

초록: 자율주행 코딩 에이전트의 도입이 빠르게 확산됨에 따라, 에이전트 평가는 주로 대상 코드베이스를 고정한 상태에서 작업 완료율에 초점을 맞춰왔습니다. 이는 중요한 질문을 남겨둡니다: 코드의 구조적, 스타일적 품질, 즉 '클린함(Cleanliness)'은 에이전트가 코드를 탐색하고 수정하는 능력에 영향을 미치는가?

에이전트의 고유한 능력과 코드 클린함의 효과를 분리하기 위해, 우리는 최소 대립쌍(minimal pairs)을 기반으로 한 평가 프로토콜을 도입했습니다. 이 쌍들은 아키텍처, 종속성(dependencies), 외부 동작은 동일하지만 정적 분석 규칙 위반 및 인지적 복잡성(cognitive complexity)이 다른 저장소들입니다. 이러한 쌍은 깔끔한 저장소를 저하시키거나 지저분한 저장소를 정리하는 에이전트 파이프라인을 통해 양방향으로 구성됩니다.

우리는 6개의 이러한 쌍에 걸쳐 33개의 작업을 작성했으며, 애플리케이션의 공개 인터페이스에서 숨겨진 테스트를 통해 평가했습니다. Claude Code를 사용한 660회의 시험 결과, 코드의 클린함은 에이전트의 통과율(pass rate)을 변화시키지 않았습니다. 그러나 에이전트의 작업 발자취(operational footprint)는 상당히 변경되었습니다: 더 깔끔한 코드에서 작업하는 에이전트는 토큰(token)을 7~8% 적게 사용하고 파일 재방문을 34% 줄였습니다.

우리의 연구 결과는 전통적인 유지보수 용이성 원칙이 AI 기반 개발 시대에도 여전히 매우 중요하며, 코딩 에이전트의 연산 비용과 탐색 효율성을 형성한다는 것을 시사합니다. 코드 클린함은 모델 선택, 하네스(harness), 프롬프팅과 함께 에이전트의 행동에 실질적으로 영향을 미치는 요소로 자리 잡았습니다.

원문 보기
원문 보기 (영어)
--> Computer Science > Software Engineering arXiv:2605.20049 (cs) [Submitted on 19 May 2026] Title: Does Code Cleanliness Affect Coding Agents? A Controlled Minimal-Pair Study Authors: Priyansh Trivedi , Olivier Schmitt (SonarSource) View a PDF of the paper titled Does Code Cleanliness Affect Coding Agents? A Controlled Minimal-Pair Study, by Priyansh Trivedi and 1 other authors View PDF HTML (experimental) Abstract: As autonomous coding agents see rapid adoption, their evaluation has primarily focused on task completion rates holding the target codebase fixed. This leaves a critical question unanswered: does the structural and stylistic quality, or ``cleanliness'' of the underlying code affect an agent's ability to navigate and modify it? To isolate the effect of code cleanliness from agent capability, we introduce an evaluation protocol built around minimal pairs: repositories that match on architecture, dependencies, and external behaviour, but differ on static-analysis rule violations and cognitive complexity. The pairs are constructed in both directions, by agent pipelines that either degrade a clean repository or clean a messy one. We author 33 tasks across six such pairs, evaluated through hidden tests at the application's public surface. Across 660 trials with Claude Code, code cleanliness does not change the agent's pass rate. However, it substantially alters the agent's operational footprint: agents working on cleaner code use 7 to 8% fewer tokens and reduce file revisitations by 34%. Our findings suggest that traditional maintainability principles remain highly relevant in the era of AI-driven development, shaping the computational cost and navigational efficiency of coding agents. Code cleanliness joins model choice, harness, and prompting as a factor that materially affects agent behaviours. Subjects: Software Engineering (cs.SE) ; Artificial Intelligence (cs.AI) Cite as: arXiv:2605.20049 [cs.SE] (or arXiv:2605.20049v1 [cs.SE] for this version) https://doi.org/10.48550/arXiv.2605.20049 Focus to learn more arXiv-issued DOI via DataCite Submission history From: Priyansh Trivedi [ view email ] [v1] Tue, 19 May 2026 16:06:26 UTC (1,094 KB) Full-text links: Access Paper: View a PDF of the paper titled Does Code Cleanliness Affect Coding Agents? A Controlled Minimal-Pair Study, by Priyansh Trivedi and 1 other authors View PDF HTML (experimental) TeX Source view license Current browse context: cs.SE < prev | next > new | recent | 2026-05 Change to browse by: cs cs.AI References & Citations NASA ADS Google Scholar Semantic Scholar export BibTeX citation Loading... BibTeX formatted citation &times; loading... Data provided by: Bookmark Bibliographic Tools Bibliographic and Citation Tools Bibliographic Explorer Toggle Bibliographic Explorer ( What is the Explorer? ) Connected Papers Toggle Connected Papers ( What is Connected Papers? ) Litmaps Toggle Litmaps ( What is Litmaps? ) scite.ai Toggle scite Smart Citations ( What are Smart Citations? ) Code, Data, Media Code, Data and Media Associated with this Article alphaXiv Toggle alphaXiv ( What is alphaXiv? ) Links to Code Toggle CatalyzeX Code Finder for Papers ( What is CatalyzeX? ) DagsHub Toggle DagsHub ( What is DagsHub? ) GotitPub Toggle Gotit.pub ( What is GotitPub? ) Huggingface Toggle Hugging Face ( What is Huggingface? ) ScienceCast Toggle ScienceCast ( What is ScienceCast? ) Demos Demos Replicate Toggle Replicate ( What is Replicate? ) Spaces Toggle Hugging Face Spaces ( What is Spaces? ) Spaces Toggle TXYZ.AI ( What is TXYZ.AI? ) Related Papers Recommenders and Search Tools Link to Influence Flower Influence Flower ( What are Influence Flowers? ) Core recommender toggle CORE Recommender ( What is CORE? ) Author Venue Institution Topic About arXivLabs arXivLabs: experimental projects with community collaborators arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website. Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them. Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs . Which authors of this paper are endorsers? | Disable MathJax ( What is MathJax? )