메뉴
HN
Hacker News 5일 전

AI를 활용해 더 느리지만 더 나은 코드 작성하기

IMP
8/10
핵심 요약

이 글은 AI 코딩의 목적이 단순히 대량의 저품질 코드를 빠르게 양산하는 것이 아니라, 오히려 코드 품질을 높이기 위해 더 느리고 꼼꼼하게 작업하는 데 활용해야 한다고 주장합니다. 저자는 여러 LLM 에이전트를 활용해 PR의 버그를 찾고 가양성을 제거하는 워크플로우를 소개하며, 이를 통해 전체 코드베이스의 건강성을 크게 개선할 수 있다고 설명합니다.

번역된 본문

Read the Tea Leaves Software and other dark arts, by Nolan Lawson

많은 사람들이 AI 코딩의 요점은 최대한 빨리 저품질 코드를 작성하는 것이라고 확신하는 것 같습니다. 그럭저럭 넘어갈 만한 쓰레기 코드(slop)를 쏟아내고, 거대한 PR(풀 리퀘스트)을 열고, 검증 없이 병합하는 식입니다. 일단 배포해요!

하지만 사실 LLM(대형 언어 모델)은 매우 유연합니다. 그리고 이를 활용해 더 느리게 고품질 코드를 작성하는 데에도 똑같이 효과적으로 사용할 수 있습니다.

이 말은 지금 저에게 너무나 당연해 보여서, 사실 이 글을 쓰고 싶지 않을 정도였습니다. 하지만 LLM은 그저 쓰레기 코드 제조기(slop cannons)로만 쓸모있다고 확신하는 사람들이 여전히 충분히 많기에 반대되는 의견을 제시할 가치가 있다고 생각했습니다.

만약 Mythos가 우리에게 무언가를 가르쳐줬다면, 그것은 LLM 에이전트가 버그를 찾는 데 매우 뛰어나다는 것입니다. 코드베이스에 에이전트를 여러 번 던져보면, 처리할 수 없을 정도로 수많은 버그를 찾아낼 것입니다. 다른 많은 분들처럼, 저 역시 Mythos가 아닌 다른 모델들에서도 이것이 사실임을 발견했습니다. 미묘한 버그를 찾거나 가양성(false positive)을 피하는 데 있어 일부 모델이 다른 모델보다 더 뛰어날 수 있지만, Anthropic과 OpenAI의 최신 공개 모델들이 검증되지 않은 코드베이스에서 수많은 버그를 찾기에 충분히 훌륭하다는 것은 사실입니다.

문제는 버그를 찾는 것 자체보다는, 이를 우선순위로 정하고 검증하는 데 있습니다. 이러한 이유로 저는 한 글의 핵심 통찰력을 응용하여 나만의 Claude 스킬(기능)을 만들었습니다. 그 통찰이란, 하나의 PR 리뷰에 더 많고 다양한 모델을 투입할수록 환각(hallucination)이나 가짜 버그가 나올 가능성이 줄어든다는 것입니다.

이 스킬의 지시문은 다음과 같습니다 (요약): "Claude 하위 에이전트, Codex, 그리고 Cursor Bugbot을 실행하여 이 PR의 버그를 Critical(심각)/High(높음)/Medium(보통)/Low(낮음) 순위로 찾아라. 모든 작업이 끝나면, 그 결과를 검토하고 가양성을 제거하기 위해 직접 조사한 뒤 최종 보고서를 작성해라."

기본적으로 이게 전부입니다. 원한다면 '버그'에 대한 본인만의 정의를 추가할 수 있습니다. 저의 경우 KISS(단순하게 유지)와 DRY(반복하지 않기) 원칙, 접근성 높은 HTML/JSX 작성, SQL 쿼리에 적절한 인덱스 사용 등에 대한 조항을 포함시켰습니다.

제 경험상, 이 스킬은 항상 PR에서 수많은 버그를 찾아내며 가양성 비율은 거의 0%에 가깝습니다. 버그가 너무 많이 발견되어, 이를 모두 해결하려고 하면 지루하고 기진맥진해질 것입니다. 치명적인 보안 또는 정확성 버그부터, 더 일상적인 중간 수준의 성능 버그, 그리고 낮은 수준의 '이 주석은 오해의 소지가 있다'는 식의 버그까지 아주 다양하게 나옵니다.

저의 일반적인 워크플로우는 다음과 같습니다:

  • (올바른 솔루션에 대한 저의 가이드와 함께) 에이전트가 모든 Critical 및 High 버그를 수정하게 한 뒤, 더 이상 Critical/High 버그가 없을 때까지 반복합니다.
  • 수정 비용 대비 얻는 이익이 적은 High/Medium 버그는 건너뜁니다 (예: 좁은 예외 상황 하나를 수정하기 위해 100줄의 코드를 작성해야 하는 경우).
  • Critical 버그가 너무 많아서 PR의 전체적인 접근 방식 자체가 잘못되었다는 것을 깨닫게 되면, PR을 폐기합니다.

저는 이 기술을 사용할 때 제 개발 속도(velocity)가 반드시 빨라진다고 생각하지 않습니다. 오히려 리뷰 과정에서 기존에 존재하던 버그가 자주 발견되기 때문에, 단위 테스트(unit test)를 작성하고 PR 이전부터 존재했던 미묘한 결함들을 수정하는 엉뚱한 사이드 퀘스트에 빠지게 됩니다.

이는 대부분의 사람들이 '바이브 코딩(vibe coding)'을 떠올릴 때 상상하는 '10배 빠른 생산성'의 쓰레기 코드 배출 스타일과는 정반대이지만, 저는 이 방식이 매우 만족스럽습니다. 이는 코드베이스의 전반적인 건강성을 개선하는 훌륭한 방법일 뿐만 아니라, 코드베이스의 복잡하고 잘 모르던 구석에 대해서도 알려줍니다.

제 경험상, 복잡한 아키텍처의 정상 경로(happy-path)보다 실패 모드(failure modes)가 더 흥미로운 경우가 많습니다. 그리고 LLM 이전의 시절에는 보통 이런 방식으로 코드베이스에 익숙해졌습니다. 즉, 코드의 기본 전제가 어디에서 무너지는지 이해하고, 직접 손을 더럽혀 이를 수정하는 식이었습니다.

만약 여러분이 'AI 코딩은 쓸모가 없다'고 회의적인 사람이라면, 이 글이 여러분을 설득하지 못할 것이라고 생각합니다. 하지만 여러분이 에이전트를 사용해 스스로도 제대로 이해하지 못하는 수백 줄짜리 PR을 작성하는 개발자라면, 속도를 조금 늦추고 이 다른, 그리고 더 느린 스타일의 '바이브 코딩'을 시도해 보기를 권하고 싶습니다. 에이전트에게 여러분의 PR이 어떻게 작동하며 어떻게 실패할 수 있는지 물어보세요.

원문 보기
원문 보기 (영어)
Read the Tea Leaves Software and other dark arts, by Nolan Lawson Home Apps Code Talks About « The diminished art of coding 25 May Using AI to write better code more slowly Posted May 25, 2026 by Nolan Lawson in software engineering . Tagged: AI . 4 Comments A lot of people seem convinced that the point of AI coding is to write low-quality code as fast as possible. Spew out barely-passable slop, open massive PRs, and merge them unvetted. Ship it! But the thing is, LLMs are very flexible. And you can use them just as effectively to write high-quality code more slowly . This statement seems completely obvious to me at this point, and I almost didn't want to write this post for that reason. But there seem to be enough people convinced that LLMs are only good as slop cannons that it's worth making the opposite case. If Mythos taught us anything, it's that LLM agents are really good at finding bugs. Throw them at a codebase enough times, and they will find so many bugs that you'll barely know what to do with them. Like many others , I've also found this is true of non-Mythos models – some may be better than others at finding subtle bugs or avoiding false positives, but the fact is that the latest public models from Anthropic and OpenAI are good enough to find plenty of bugs in an unscrutinized codebase. The problem is not so much finding the bugs, but instead prioritizing and validating them. For this reason I have a Claude skill I adapted from this article ‘s core insight, which is that the more, different models you throw at a PR review, the less likely you are to get hallucinations or bogus bugs. The skill says (paraphrasing): Run a Claude sub-agent, Codex, and Cursor Bugbot to find bugs in this PR ranked by critical/high/medium/low. Once they're all done, review their findings, do your own research to rule out false positives, and write a final report. That's basically it. You can add your own definition of "bug" if you want – mine has stipulations about the KISS and DRY principles, writing accessible HTML/JSX, using proper indexes for SQL queries, etc. In my experience, this skill always finds tons of bugs in a PR, and the false positive rate is near zero. It finds so many bugs that you'll be bored senseless if you try to tackle them all. They'll range from critical security or correctness bugs to the more mundane medium-level perf bugs to low-level "this comment is misleading"-type bugs. My typical workflow is: Have an agent fix all the criticals and highs (with my guidance on the proper solution), then repeat until no criticals/highs Skip highs/mediums where the juice isn't worth the squeeze (e.g. 100 lines of code to fix a narrow edge case) Abandon the PR if it has so many criticals that I realize the whole approach is misguided When I use this technique, I haven't necessarily seen my velocity go up. If anything, the review process often finds pre-existing bugs, so I end up on a tangential side-quest where I'm writing unit tests and fixing subtle flaws that pre-date the PR. This is the opposite of the "10x productivity" slop-cannon style of development that most people imagine when they think of vibe coding, but I find it very satisfying. It's a great way to improve the overall health of the codebase while also teaching you about the odd corners of it. In my experience, the happy-path of a complex architecture is less interesting than its failure modes. And pre-LLMs, this is usually how I got familiar with a codebase anyway: understanding where the assumptions break down, and then getting my hands dirty to fix it. If you're the kind of person who is skeptical that AI coding is good for anything , then I doubt this post will persuade you. But if you're the kind of developer who uses agents to write multi-hundred-line PRs that you barely understand yourself, I'd invite you to slow down a bit and try this other, slower style of "vibe coding." Ask an agent how your PR works and how it might fail. Have it write Markdown docs with Mermaid charts if necessary. Use Matt Pocock's /grill-me skill until you understand the entire PR front-to-back. You might not be more "productive" in terms of raw lines of code. You might burn a ton of tokens just to find out that your entire plan was wrongheaded from the start. But I find this style of coding to be a more super-powered version of the kind of programming I was already trying to do before LLMs: careful, methodical, quality-obsessed, focused on making things better for the next coder. So take a deep breath, slow down, try this technique, and see if you don't enjoy writing better code more slowly. Related 4 responses to this post. Posted by heckj on May 25, 2026 at 9:32 AM I've found the same technique — doing multiple sweeps — super effective for all kinds of review; I use the same for editorial review of grammar, punctuation, spelling, and so on. One thing I've realized is that wiping the context *between* sweeps also helps. And I've started to switch up my code reviews to "5-7 different lens" running in parallel — looking for different kinds of issues — and then collating the results and loosely ranking them. Reply Posted by Nolan Lawson on May 25, 2026 at 10:07 AM You're right, clearing context really seems to help. That's one of the reasons my reviewer skill specifies that the main agent shouldn't do original research until all 3 sub-agents have returned – otherwise there's a tendency to be influenced by the first result. I haven't tried splitting up reviewers into different archetypes, but maybe it helps when you have a PR that spans multiple domains (frontend, backend, infra, etc.). Reply Posted by 慢即是快:利用 AI 编写更高质量代码的逆向思考 on May 25, 2026 at 5:48 PM […] 原文链接:Hacker News […] Reply Posted by L'IA pour coder mieux, mais plus lentement : une réalité nuancée - IA Actu - Actualité Intelligence Artificielle on May 25, 2026 at 6:01 PM […] Source : Hacker News (Algolia) […] Reply Leave a comment Cancel reply Δ This site uses Akismet to reduce spam. Learn how your comment data is processed. Recent Posts Using AI to write better code more slowly The diminished art of coding You had a story Days of miracle and wonder We mourn our craft About Me I'm Nolan, a programmer from Seattle working at Socket. All opinions are my own. Photo by Cătălin Mariș. Archives May 2026 (1) March 2026 (1) February 2026 (4) January 2026 (2) December 2025 (4) November 2025 (1) August 2025 (1) June 2025 (1) April 2025 (1) January 2025 (1) December 2024 (2) October 2024 (2) September 2024 (3) August 2024 (1) July 2024 (1) March 2024 (1) January 2024 (1) December 2023 (4) August 2023 (2) January 2023 (2) December 2022 (1) November 2022 (2) October 2022 (2) June 2022 (4) May 2022 (3) April 2022 (1) February 2022 (1) January 2022 (1) December 2021 (3) September 2021 (1) August 2021 (6) February 2021 (2) January 2021 (2) December 2020 (1) July 2020 (1) June 2020 (1) May 2020 (2) February 2020 (1) December 2019 (1) November 2019 (1) September 2019 (1) August 2019 (2) June 2019 (4) May 2019 (3) February 2019 (2) January 2019 (1) November 2018 (1) September 2018 (5) August 2018 (1) May 2018 (1) April 2018 (1) March 2018 (1) January 2018 (1) December 2017 (1) November 2017 (2) October 2017 (1) August 2017 (1) May 2017 (1) March 2017 (1) January 2017 (1) October 2016 (1) August 2016 (1) June 2016 (1) April 2016 (1) February 2016 (2) December 2015 (1) October 2015 (1) September 2015 (1) July 2015 (1) June 2015 (2) October 2014 (1) September 2014 (1) April 2014 (1) March 2014 (1) December 2013 (2) November 2013 (3) August 2013 (1) May 2013 (3) January 2013 (1) December 2012 (1) November 2012 (1) October 2012 (1) September 2012 (3) June 2012 (2) March 2012 (3) February 2012 (1) January 2012 (1) November 2011 (1) August 2011 (1) July 2011 (1) June 2011 (3) May 2011 (2) April 2011 (4) March 2011 (1) Tags accessibility AI alogcat android android market apple app tracker benchmarking boost bootstrap browsers bu