메뉴
HN
Hacker News • 19일 전

포니테일: 시니어 엔지니어의 '게으름' 기술

IMP
6/10
핵심 요약

해커뉴스에 올라온 'Ponytail'은 AI 코딩 에이전트가 불필요하게 과도한 코드를 생성하는 습관을 잡아주는 플러그인이다. 50줄짜리 캐시 매니저 대신 표준 라이브러리의 lru_cache 한 줄을 쓰게 하는 식으로, 최소한의 코드로 동일한 동작을 구현하도록 유도한다. 벤치마크에 따르면 코드 54% 감소, 토큰 22% 절약, 비용 20% 절감, 속도 27% 향상 효과를 보였으며 Claude Code, Codex, Copilot 등 14개 이상의 에이전트에서 사용 가능하다.

번역된 본문

~/ponytail README.md built.md ☀ 라이트 모드

핵심 아이디어 당신의 에이전트는 50줄을 작성하려 하지만, 그 작업에는 단 한 줄이면 충분하다.

cache.py −48 +1

  • class CacheManager:
  • def init(self, ttl, maxsize):
  • self._store, self._lock = {}, Lock()
    
  • # ...앞으로 평생 유지해야 할 44줄 더
    
  • @lru_cache(maxsize=1000)
  • def fetch(...): ...

// 동일한 동작. 48줄 감소. 존재하지 않는 코드에는 버그도 없다.

사다리(우선순위 체계) 버틸 수 있는 첫 번째 단계에서 멈춰라.

  1. 이게 정말 존재해야 하는가? — 가정적인 필요성이면 건너뛰기 (YAGNI)
  2. 이미 이 코드베이스에 있는가? — 이미 존재하는 헬퍼, 유틸, 패턴을 재사용
  3. 표준 라이브러리가 처리하는가? — 표준 라이브러리 사용
  4. 플랫폼 네이티브 기능으로 충분한가? — 피커 라이브러리 대신
  5. 이미 설치된 의존성이 해결하는가? — 새 의존성 추가하지 말고 그것을 사용
  6. 한 줄로 가능한가? — 한 줄로.
  7. 그다음에야: 동작하는 최소한의 코드.

벤치마크 코드는 줄고, 토큰은 줄고, 안전성은 그대로.

  • 코드 54% 감소
  • 토큰 22% 절약
  • 비용 20% 절감
  • 속도 27% 향상
  • 안전성 100% 유지

// FastAPI + React 저장소에서 12개 기능 작업의 중앙값 기준. // 검증, 에러 처리, 보안, 접근성은 절대 단순화에서 제외되지 않음.

설치 Claude Code에서는 두 줄이면 된다.

Claude Code

/plugin marketplace add DietrichGebert/ponytail /plugin install ponytail@ponytail

codex

codex plugin marketplace add DietrichGebert/ponytail

copilot cli

copilot plugin install ponytail@ponytail

gemini cli

gemini extensions install github.com/DietrichGebert/ponytail

pi harness

pi install git:github.com/DietrichGebert/ponytail

// OpenCode, Cursor, Windsurf, Cline, Kiro, Zed 등도 지원 — 14개 이상의 에이전트. // 전체 목록은 README 참조.

명령어 채팅에서 직접 제어.

/ponytail lite|full|ultra|off — 강도 설정 또는 끄기 /ponytail-review — 현재 diff에서 과잉 엔지니어링 찾기 /ponytail-audit — 전체 저장소에서 비대한 코드 스캔 /ponytail-debt — 미뤄둔 지름길을 장부로 수집 /ponytail-gain — 벤치마크 스코어보드 표시 /ponytail-help — 빠른 명령어 참조

강도 설정 얼마나 게으를지 선택하라.

"lite" — 요청한 대로 구현하되, 더 게으른 대안을 한 줄로 알려준다. 당신이 선택. (기본값) "full" — 사다리 원칙 강제 적용. 표준 라이브러리와 네이티브 우선. 가장 짧은 diff, 가장 짧은 설명. "ultra" — YAGNI 극단주의자. 한 줄짜리 코드를 배포하는 동시에 요구사항 자체를 의심한다.

원문 보기
원문 보기 (영어)
~/ponytail README.md built.md ☀ light mode the_whole_idea Your agent reaches for fifty lines. The job needs one. cache.py −48 +1 - class CacheManager: - def __init__(self, ttl, maxsize): - self._store, self._lock = {}, Lock() - # ...44 more lines you maintain forever + @lru_cache(maxsize=1000) + def fetch(...): ... // same behavior. 48 fewer lines. zero bugs in code that no longer exists. the_ladder Stop at the first rung that holds. Does this need to exist? Speculative need = skip it. (YAGNI) Already in this codebase? Reuse the helper, util, or pattern that already lives here. Does the standard library do it? Use it. Native platform feature covers it? <input type="date"> over a picker lib. Already-installed dependency solves it? Use it. Don't add a new one. Can it be one line? One line. Only then: the minimum code that works. benchmarks Less code. Fewer tokens. Same safety. 54% less code 22% fewer tokens 20% lower cost 27% faster 100% safety kept // medians across 12 feature tasks on a FastAPI + React repo. // validation, error handling, security and accessibility are never simplified away. install Two lines for Claude Code. # Claude Code / plugin marketplace add DietrichGebert/ponytail / plugin install ponytail@ponytail codex codex plugin marketplace add DietrichGebert/ponytail copilot cli copilot plugin install ponytail@ponytail gemini cli gemini extensions install github.com/DietrichGebert/ponytail pi harness pi install git:github.com/DietrichGebert/ponytail // also OpenCode, Cursor, Windsurf, Cline, Kiro, Zed and more — 14+ agents. // full list in the README . commands Drive it from chat. / ponytail lite|full|ultra|off set intensity, or turn it off / ponytail-review find over-engineering in the current diff / ponytail-audit scan the whole repo for bloat / ponytail-debt collect deferred shortcuts into a ledger / ponytail-gain show the benchmark scoreboard / ponytail-help quick command reference intensity Pick how lazy. "lite" Builds what you asked, names the lazier alternative in one line. You pick. # default "full" The ladder, enforced. Stdlib and native first. Shortest diff, shortest explanation. "ultra" YAGNI extremist. Ships the one-liner and challenges the rest of the requirement in the same breath.