π Ponytail β makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
π The Principle
Before writing any code, the agent stops at the first rung that holds:
- Does this need to exist? β no: skip it (YAGNI)
- Already in this codebase? β reuse it, donβt rewrite
- Stdlib does it? β use it
- Native platform feature? β use it
- Installed dependency? β use it
- One line? β one line
- Only then: the minimum that works
Lazy about the solution, never about reading.
π Measured Impact (on real Claude Code sessions, n=12 on FastAPI + React)
- β54% LOC (mean; up to β94% where overbuild trap exists like date picker)
- β22% tokens
- β20% cost
- β27% wall-clock time
- 100% safety β validation, error-handling, security, accessibility never cut
Compare: caveman (terse prose) does β20% LOC but +7% tokens. YAGNI-alone prompt does β33% LOC but drops to 95% safety.
π Installation
Cross-harness support:
| Host | Command |
|---|---|
| Claude Code | /plugin marketplace add DietrichGebert/ponytail/plugin install ponytail@ponytail |
| Codex | codex plugin marketplace add DietrichGebert/ponytailThen /plugins β install Ponytail + trust hooks |
| Copilot CLI | copilot plugin marketplace add DietrichGebert/ponytailcopilot plugin install ponytail@ponytail |
| Gemini CLI | gemini extensions install https://github.com/DietrichGebert/ponytail |
| Cursor / Windsurf / Cline | Copy .cursor/rules/ponytail.md to your projectβs .cursor/rules/ |
| VS Code (Codex) | ~/.codex/AGENTS.md (loaded auto) |
| GitHub Copilot (fallback) | Copy rules to ~/.copilot/copilot-instructions.md |
ποΈ Modes (per-session, via /ponytail [lite|full|ultra|off])
Default: full. Set globally via PONYTAIL_DEFAULT_MODE env var or ~/.config/ponytail/config.json.
βοΈ Commands
| Command | Purpose |
|---|---|
/ponytail [lite|full|ultra|off] | Set intensity or toggle. No arg = report current. |
/ponytail-review | Review the diff for over-engineering; hands back a delete-list. |
/ponytail-audit | Audit the whole repo for over-engineering, not just diff. |
/ponytail-debt | Harvest deferred ponytail: shortcuts into a ledger (βlaterβ β βneverβ). |
/ponytail-gain | Show the measured impact scoreboard (less code, less cost, more speed). |
/ponytail-help | Quick reference. |
π§© Features
- Structured output β reasoning before suggestion, chain-of-thought validation
- Syntax coverage β 9 loop transformations (Fusion, Interchange, Parallelization, Tiling, Unrolling, Skewing, Reversal), source-level & IR-level
- Safety-first β trust boundary validation, data-loss handling, security, accessibility stay
- Zero config β optional
~/.config/ponytail/config.jsonfor defaults
π When It Shines
- Date pickers: 404 LOC β 23 LOC (uses native
<input type="date">instead of npm bloat) - Color pickers: 287 LOC β 23 LOC
- Reuse patterns: agent re-reads code, avoids 3x rewrites
- Code-completion bloat: stops the βjust add another utilityβ impulse
π Links
- Repo: https://github.com/DietrichGebert/ponytail
- Benchmarks: https://github.com/DietrichGebert/ponytail/blob/main/benchmarks/results/2026-06-18-agentic.md
- Reproducible: https://github.com/DietrichGebert/ponytail/blob/main/benchmarks
- Full Writeup: https://github.com/DietrichGebert/ponytail/blob/main/README.md
Further Reading
- Caveman β similar vibe-coding approach (terse prose)
- Token Optimization for Claude Code β related cost-cutting tools
- Agentic Coding β agent-first paradigm
- Claude Code Best Practice β broader dev workflows
- Agent Skills β skill composability & sequencing