πŸš€ 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:

  1. Does this need to exist? β†’ no: skip it (YAGNI)
  2. Already in this codebase? β†’ reuse it, don’t rewrite
  3. Stdlib does it? β†’ use it
  4. Native platform feature? β†’ use it
  5. Installed dependency? β†’ use it
  6. One line? β†’ one line
  7. 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:

HostCommand
Claude Code/plugin marketplace add DietrichGebert/ponytail
/plugin install ponytail@ponytail
Codexcodex plugin marketplace add DietrichGebert/ponytail
Then /plugins β†’ install Ponytail + trust hooks
Copilot CLIcopilot plugin marketplace add DietrichGebert/ponytail
copilot plugin install ponytail@ponytail
Gemini CLIgemini extensions install https://github.com/DietrichGebert/ponytail
Cursor / Windsurf / ClineCopy .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

CommandPurpose
/ponytail [lite|full|ultra|off]Set intensity or toggle. No arg = report current.
/ponytail-reviewReview the diff for over-engineering; hands back a delete-list.
/ponytail-auditAudit the whole repo for over-engineering, not just diff.
/ponytail-debtHarvest deferred ponytail: shortcuts into a ledger (β€˜later’ β†’ β€˜never’).
/ponytail-gainShow the measured impact scoreboard (less code, less cost, more speed).
/ponytail-helpQuick 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.json for 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


Further Reading