Ponytail: How to Make AI Agents Write Less Code
Ponytail tells AI coding agents to stop at the smallest change wey works. See wetin ships, benchmark results, and how to copy the rule today.
Wetin Ponytail be
Ponytail na one set of rules wey dey make AI coding agent write less code. The project describe itself for one line: “E dey make your AI agent think like the laziest senior dev for the room. The best code na the code wey you no ever write.” E get MIT license. E no get runtime of its own, and nothing inside am dey execute. Na text wey dey enter the agent instructions. Dem package am as skill for hosts wey dey load skills, and as plain rule files for hosts wey no dey load skills.
The repository na DietrichGebert/ponytail. Dem create am on 12 June 2026, and e reach 90,000 stars by 1 August 2026. The latest tagged release on 1 August 2026 na v4.8.4. Dem publish am on 29 June 2026, and the releases page list ten tags between 14 and 29 June alone. Project wey dey move for that speed fit don change by the time you read this, so pin one tag before you build anything on top of am.
Tool dey come after idea: stop for the first rung wey hold
The main idea for Ponytail na decision ladder. Agent dey climb am before e write anything, then e stop for the first rung wey hold.
- This thing need to exist at all? This na YAGNI (you are not going to need it). If answer na no, skip am.
- This thing don already exist for this codebase? Reuse the helper or pattern wey dey there already.
- Standard library fit do am? Use am.
- Native platform feature fit cover am? Use am.
- Dependency wey don already install fit solve am? Use am.
- E fit be one line? Make am one line.
- Na only then, write the smallest code wey go work.
Na the order dey do the work, no be any single rung. If you ask agent for date picker, e go write date picker, because na that you tell am to do. The ladder make am check rung 4 first, and rung 4 talk say browser already get <input type="date">. The project own benchmark notes this exact case: date picker wey come out as 404 lines without the rule come out as 23 lines with am, because agent use the native input instead of building component. Colour picker reduce from 287 lines to 23 for the same reason.
Laziness here no mean say person no care, and the ruleset talk am directly. The "never lazy about" list cover understanding the problem before deciding, input validation for trust boundaries, error handling wey prevent data loss, security, accessibility, and anything wey you ask for by name. E also ask for one small runnable check for every piece of non-trivial logic. The rule dey cut invention. E no dey cut correctness.
Wetin the repository really dey ship
AGENTS.md, the always-on ruleset, wey be the whole idea for one file wey you fit read within five minutes.skills/ponytail/SKILL.md, the skill definition, with argument hint oflite,fullorultra.- Rule files for editor-specific directories like
.cursor/rules/and.windsurf/rules/, for hosts wey dey read rules but no dey load skills. hooks/,benchmarks/,examples/andscripts/.
The intensity argument dey change how strongly the rule dey enforce. lite dey build wetin you ask for and name one lazier option for one line. full na the default and e dey enforce the ladder. ultra na the YAGNI extremist setting: e prefer deletion instead of addition, and e go argue with the requirement itself.
Hosts wey fit use skills also get slash commands. /ponytail dey set the level, /ponytail-review dey check diff for over-engineering, /ponytail-audit dey check the whole repository, /ponytail-debt dey collect the shortcuts wey you defer, and /ponytail-gain dey print the benchmark scorecard. Hosts wey only dey read rule files get the ruleset without commands.
To read the source before you trust am, clone the tag instead of the branch:
git clone --depth 1 --branch v4.8.4 https://github.com/DietrichGebert/ponytail.gitFor Claude Code, the project document a plugin install instead, and these two lines dey follow the documentation as of 1 August 2026:
/plugin marketplace add DietrichGebert/ponytail
/plugin install ponytail@ponytailThe plugin path dey follow the default branch instead of a tag, so the instructions wey dey guide your agent fit change without notice between sessions. Na the trade-off you accept for the convenience of an update command.
Why lazy agent dey cheaper for VPS
The diff wey agent write no dey comot from the conversation. For the next turn, model go read am again as context, together with every file wey e open to produce am. So, 500 line change dey add cost to every later turn for the session, no be only the turn wey produce am. Na why runaway refactor dey make agent feel slower and less capable as the session dey continue: the window dey fill with the agent own output, so the space wey remain for your actual code dey reduce. To control this na the main topic for how to manage coding agent context window.
Dem dey charge tokens for input and output, so diff wey be half the size go cost less two times: first when agent write am, and again for every turn wey read am again. If you dey monitor the bill for self-hosted setup, the instruction file na lever wey no cost anything to use. How to control wetin AI agent dey cost you dey start with output volume, and how coding agent dey spend im tokens explain why re-reading dey matter pass wetin people expect.
Human being still dey read the diff. A 400 line change wey suppose be 20 lines dey take reviewer attention, and attention na the resource wey dey finish first. Nobody dey review the fourth long diff of the day with the same care wey dem give the first one, so over-building no be only waste of time. E dey quietly reduce the quality of the review wey suppose catch the mistakes.
For server, the risk dey different because agent often dey run when nobody dey watch am. Agent wey dey work for tmux session or on timer fit get hours to build on bad decision before you see am. Na the practical risk for running coding agent on VPS, and na why people wey dey do loop engineering dey put plenty care for standing instructions instead of individual prompts. Rule for the always-on file dey apply to turn 200. Rule wey you type for chat dey apply to turn 3.
New dependencies na another quiet cost. Rung 5 say make you use wetin dey installed. Every package wey agent add by im own choice na something you go patch later, and something wey go enter every container image wey you build from that repository.
Wetin Ponytail own benchmark numbers talk
The project publish two sets of results, and dem no agree with each other at all. Na the project publish both figures by itself. No independent test dey here.
The data behind this chart
[
{
"label": "Lines of code",
"single_shot_pct": 93,
"agentic_pct": 54
},
{
"label": "Cost per run",
"single_shot_pct": 63,
"agentic_pct": 20
},
{
"label": "Wall clock time",
"single_shot_pct": 74,
"agentic_pct": 27
}
]The single shot column come from a bare model wey answer small set of prompts with and without the rule. Dem take the median across repeated runs dated 13 and 17 June 2026. The agentic column come from a headless Claude Code session wey edit tiangolo's full-stack-fastapi-template, a real FastAPI and React repository, across twelve feature tickets, with four runs for each ticket on Haiku 4.5. Dem score am based on the git diff wey remain.
Read the second column. The agentic result get 54 percent fewer lines of code, 20 percent lower cost and 27 percent less wall clock time, compared with 93 percent and 74 percent for the same measures in the single shot setup. The README explain the reason clearly: the single shot baseline na bare model wey "answers with several options plus commentary", and that one easy to beat. When you compare am with a real agent wey dey do real work, the gain reduce. But the result still hold, and na that one more useful.
One caveat come from the project itself, and na this one decide whether the rule go help you. The saving dey highest where genuine over-build trap dey, and e nearly reach zero for code wey already minimal. Twelve tickets inside one Python and TypeScript repository no fit predict wetin go happen for your repository. If the number matter to you, run the comparison with your own tickets, with and without the rule, then count the lines by yourself.
Di pattern wey you fit copy today without installing anything
Di ladder na text, so you no need di plugin to use di idea. Paste block like dis inside di instruction file wey your agent dey already read, whether na AGENTS.md, CLAUDE.md or your editor's rules file.
## Before you write code
Climb this list in order. Stop at the first line that applies.
1. Does this need to exist? If not, say so and stop.
2. Does this repo already have it? Reuse the helper.
3. Does the standard library do it? Use it.
4. Does the platform do it natively? Use it.
5. Does an installed dependency do it? Use it.
6. Can it be one line? Write one line.
7. Otherwise write the minimum that works.
Never take the shortcut on: reading the code before changing it, validating
input that crosses a trust boundary, error handling that would otherwise lose
data, security, accessibility, or anything I asked for by name.
Do not add an abstraction I did not ask for. Do not add a dependency without
saying why in one line. Prefer deleting code to adding it.
Mark a deliberate simplification with a comment naming its ceiling and the
upgrade path.Dat last rule worth handling by itself. Ponytail's convention na comment wey get tool name as tag:
# ponytail: global lock, per-account locks if throughput mattersDi comment na two lines of work, and e settle question wey fit otherwise cost one review cycle. E tell di next reader say di simple version na decision, and e name di condition wey go make dat decision stop to apply. Without am, reviewer no fit know whether na considered shortcut or something wey agent forget, so dem go need ask.
Where you put di block matter as much as wetin e talk. File wey agent loads for every run dey guide every run, including di ones wey you no dey monitor. Dat difference na di subject of how to write AGENTS.md wey your agent go actually follow, and na why dis pattern suppose dey inside committed file instead of your shell history.
Wey di rule no dey work again
This ladder na for feature work inside codebase wey don already dey exist, where reuse dey usually available and correct. E no fit greenfield project well, because rung 2 no get anything to reuse and rung 5 no get anything installed, so agent go fall reach rung 7 every time. E still no fit the time wey you truly want abstraction. If you dey prepare to add the fourth caller for the same copied block, “shortest diff” go give you fifth copy.
The ultra level go challenge your requirements. Na wetin the level dey for, and e be real cost when you don already make the decision and you want make the work happen. Use full for normal work, and use ultra when you suspect say feature request na the problem.
No instruction block fit save you from misunderstanding the problem. The ruleset first item na to understand the code before you decide, and na the expensive part wey the text no fit do for you. Minimal diff inside wrong function still be wrong fix, and now na small wrong fix wey easy to approve.
The honest summary be say Ponytail na prompt wey dem write carefully, distribute well, and attach numbers to. Nothing inside am require the plugin. Wetin the project give you be say person write the list properly, test am against real repository, and publish the method beside the result.
FAQ
Ponytail dey work with agents wey no be Claude Code?
Yes. E dey ship as a skill for hosts wey dey load skills. This list include Claude Code, Codex, OpenCode, Gemini and some others wey README name. Editors wey dey read rule files but no dey load skills, like Cursor, Windsurf, Cline and Copilot, dey use the always-on ruleset from the matching rules directory and dem no get slash commands. The text dey the same for both options. The real difference na whether your host dey keep that text for context on every turn, or only when e trigger a skill.
Lazy agent go skip tests, validation or security?
No, and the ruleset talk this one directly. The "never lazy about" list name input validation for trust boundaries, error handling wey dey prevent data loss, security and accessibility. E also ask for one small runnable check for every piece of non-trivial logic. The rule remove invented structure: abstractions wey nobody request and dependencies wey nobody need. If your agent start to drop tests after you install am, another instruction for your own config dey outrank this one. So read the file wey the agent load last.
Published speed and cost numbers dey reliable?
Dem na the project own measurements, published with the method wey dem use, and you suppose read dem that way. The single shot figures compare against a bare model wey reply with options and commentary. The README itself mark this as a weak baseline. The agentic figures come from one headless Claude Code session for one FastAPI and React repository, twelve tickets, four runs each, on Haiku 4.5. Those numbers correct for that setup. Dem no be forecast for your codebase, because the project also talk say the saving dey fall near zero for code wey already minimal.
I need install anything before I fit get the benefit?
No. The ladder na text. If you paste an equivalent block inside the instruction file wey your agent already dey read, you go get most of the effect. The plugin give you maintained wording, intensity levels, review commands and an update path. Trying the copied block first na the rung 1 answer to whether the install need to exist at all.
How I fit stop unattended agent from over-building overnight?
Put the rule inside the always-on instruction file instead of chat message. That way, e go apply for turn 200 of a long run, and no be only for turn 3. Then limit the damage separately: give the agent a checkout wey e fit spoil instead of your only copy, and require human diff review before anything merge. A minimal diff rule reduce how much you need read. E no decide wetin go land, and e suppose not decide am.