DietrichGebert/ponytail

Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.

What it solves

Ponytail 防止 AI 代理過度設計程式碼。它阻止代理寫過多的樣板程式、安裝不必要的相依套件,或在已有更簡單、原生或現有解決方案時重新實作功能。

How it works

Ponytail 實作一個「階梯」式的決策流程,代理在撰寫任何程式碼前必須依序檢視以下階段:

  1. Does this need to exist? (YAGNI - You Ain't Gonna Need It)
  2. Already in this codebase? (Reuse existing code)
  3. Stdlib does it? (Use standard libraries)
  4. Native platform feature? (Use native browser/OS features)
  5. Installed dependency? (Use existing dependencies)
  6. One line? (Write a single line of code)
  7. Minimum that works (Only then write the minimum necessary code)

它的設計理念是「對解決方案保持懶散,對閱讀保持嚴謹」,確保安全性、保安與可及性永不因追求簡潔而受犧牲。

Who it’s for

使用 AI 程式編寫代理(如 Claude Code、Codex、Devin、Cursor、Windsurf 等)的開發者,想要減少程式碼膨脹、降低 LLM token 成本,並透過迫使代理產出更精簡、必要的程式碼來降低延遲。

Highlights

  • Broad Agent Compatibility: Supports a wide array of tools including Claude Code, Codex, Devin CLI, Gemini, and others via plugins or rule files.
  • Measurable Impact: Benchmarks show significant reductions in lines of code (LOC), tokens, cost, and time while maintaining 100% safety.
  • Customizable Intensity: Offers different modes (lite, full, ultra, off) to control how aggressively the agent avoids over-engineering.
  • Specialized Commands: Includes tools for reviewing diffs for over-engineering (/ponytail-review), auditing entire repos (/ponytail-audit), and tracking deferred shortcuts (/ponytail-debt).