에이전트 규칙은 성능을 향상시키거나 왜곡하는가? 코딩 에이전트에서 제약 조건이 지침보다 효과적이다
Do Agent Rules Shape or Distort? Guardrails Beat Guidance in Coding Agents
개발자들은 점점 더 많은 AI 코딩 에이전트를 자연어 기반 지침 파일(예: CLAUDE.md, .cursorrules)을 통해 제어하고 있지만, 이러한 규칙이 실제로 에이전트 성능을 향상시키는지, 그리고 어떤 특성이 규칙을 유용하게 만드는지 측정하는 통제된 연구는 아직 없었습니다. 저희는 GitHub에서 679개의 파일을 수집(총 25,532개의 규칙)하여, SWE-bench Verified 데이터셋에서 최첨단 코딩 에이전트를 사용하여 5,000번 이상의 에이전트 실행을 통해 최초의 대규모 실증적 평가를 수행했습니다. 규칙은 성능을 7~14% 향상시켰지만, 전문가가 선별한 규칙과 무작위 규칙이 비슷한 효과를 나타내어, 규칙이 특정 지침보다는 컨텍스트 프라이밍을 통해 작동한다는 것을 시사합니다. '불필요한 코드 리팩터링을 하지 마라'와 같은 부정적인 제약 조건만이 개별적으로 유용한 규칙 유형인 반면, '코드 스타일을 따라라'와 같은 긍정적인 지침은 실제로 성능을 저하시키는 경향이 있습니다. 이러한 패턴은 잠재 기반 보상 형성(PBRS)의 관점에서 분석했습니다. 또한, 개별 규칙은 대부분 단독으로 사용할 경우 해롭지만, 전체적으로는 도움이 되며, 50개까지의 규칙을 사용하더라도 성능 저하가 발생하지 않습니다. 이러한 결과는 숨겨진 신뢰성 위험을 보여줍니다. 즉, 의도적으로 작성된 규칙이 일상적으로 에이전트 성능을 저하시킨다는 것입니다. 또한, 안전한 에이전트 구성을 위한 명확한 원칙을 제시합니다. 즉, 에이전트가 '하지 않아야 할 일'을 제한하는 것이 '해야 할 일'을 처방하는 것보다 효과적입니다.
Developers increasingly guide AI coding agents through natural language instruction files (e.g., CLAUDE.md, .cursorrules), yet no controlled study has measured whether these rules actually improve agent performance or which properties make a rule beneficial. We scrape 679 such files (25,532 rules) from GitHub and conduct the first large-scale empirical evaluation, running over 5,000 agent runs with a state-of-the-art coding agent on SWE-bench Verified. Rules improve performance by 7--14 percentage points, but random rules help as much as expert-curated ones -- suggesting rules work through context priming rather than specific instruction. Negative constraints ("do not refactor unrelated code") are the only individually beneficial rule type, while positive directives ("follow code style") actively hurt -- a pattern we analyze through the lens of potential-based reward shaping (PBRS). Moreover, individual rules are mostly harmful in isolation yet collectively helpful, with no degradation up to 50 rules. These findings expose a hidden reliability risk -- well-intentioned rules routinely degrade agent performance -- and provide a clear principle for safe agent configuration: constrain what agents must not do, rather than prescribing what they should.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.