Kod Temizliği Yapay Zeka Kodlama Ajanlarını Nasıl Etkiliyor?
Yeni bir araştırma, kod temizliğinin AI kodlama ajanlarının başarı oranını değil, token maliyetini ve verimliliğini etkilediğini gösteriyor.
Evaluations of autonomous coding agents typically focus on task completion rates while keeping the underlying codebase fixed, leaving open the question of whether code cleanliness affects an agent's ability to navigate and modify code. This study introduces a 'minimal pairs' protocol: repositories matched on architecture, dependencies, and external behavior but differing in static-analysis violations and cognitive complexity, constructed by either degrading clean code or cleaning messy code.
Across 33 tasks over six repository pairs and 660 trials using Claude Code, code cleanliness did not change the agent's pass rate. However, it significantly affected operational efficiency: agents working on cleaner code used 7-8% fewer tokens and revisited files 34% less often.
The findings suggest that traditional maintainability principles remain relevant in the era of AI-driven development, influencing the computational cost and navigational efficiency of coding agents. Code cleanliness now joins model choice, agent harness, and prompting as a factor that materially shapes agent behavior — a point worth considering for engineers weighing the cost-efficiency tradeoffs of code quality investments.