MONOSPACE


CRAFTNº 003

The Case for Writing Less Code

Ponytail is an anti-overengineering skill that teaches coding agents to reach for the standard library before the framework — and its corrected benchmark counts diff lines, not promises.

The most expensive code an agent writes is the code nobody asked for: a framework where a function would do, a dependency where the standard library already ships the answer. Ponytail goes straight at that habit. Thirty-five thousand stars, for what is mostly Markdown. It doesn’t analyze your code or generate any; it’s a behavior patch, installed as a skill, that changes what an agent reaches for first.

The Premise

Before it writes anything, the agent has to stop at the first rung of a six-step ladder that solves the problem: skip the work entirely, use the standard library, use the platform’s native feature, use a dependency you already have, write a single line, or, as a last resort, write the minimum code. What lifts this above a YAGNI slogan is the carve-out. Five things are never allowed to be simplified away: validation, data-loss handling, security, accessibility, and anything the requirements name outright.

The whole product is a decision ladder.

The Machine

The engineering is thin on purpose. One canonical skill file, a compact always-on fallback, two small hook scripts. Ten agent families share the same rules through thin adapters: Claude Code, Codex, Cursor, Copilot, Gemini CLI, and the rest. Three intensity modes turn the pressure up or down, from a gentle nudge to bloat-reduction-as-the-whole-point. The total footprint is about 6,500 lines and zero declared dependencies.

The Test Drive

Everything we could check on our own bench checked out. The repo’s own test suite ran clean, all sixty-two of its unit tests. The eight rules of the ladder came out identical across every adapter, so Claude Code and Codex and Cursor really are reading one rulebook. And the benchmark’s safety scorers correctly told good reference code from bad across three planted flaws: a path-traversal hole, a SQL injection, a broken HMAC check. What we couldn’t run was a live model A/B: there were no model credentials on the bench, and we didn’t fake one.

The strongest evidence is the repo’s own corrected benchmark, and it is unusually honest. Real Claude Code sessions took on twelve feature tickets in a pinned FastAPI and React app, scored not by what the model claimed but by the lines it added in git diff. Ponytail cut the code by 54%, the tokens by 22%, the cost by 20%, and the wall-clock by 27%, and it did all of that without dropping a single safety check.

It counts added lines in git diff, not prose in an answer.

The Fine Print

The scan was quiet. No critical issues in what ships, no real credentials anywhere, and with zero dependencies there is nothing for npm audit to catch. Two caveats. The missing lockfile hurts reproducibility. And the benchmark’s graders run the code they are grading, so keep those in a throwaway environment.

The Playbook

Start with the diet. Install the skill, point the agent at ordinary backend and frontend tickets, and let the ladder make its case for the standard library before the framework. That 54% reduction came from ordinary tickets like these, the kind your team files every day. Running more than one agent? Put the same rules on all of them. The eight ladder rules came out identical across every adapter on our bench, so Claude Code, Codex, and Cursor inherit one temperament from one file, and your review bar stops depending on which tool happened to write the diff.

Resist the cheap substitute. The most instructive result in the study is the control run: a bare “YAGNI” one-liner got respectable reductions too, and then quietly dropped a path-traversal guard. The carve-outs that refuse to simplify validation, data handling, and security are the actual product. The slogan is just the wrapper. And when you want a number instead of a hunch, borrow the harness: point the benchmark’s diff-line scorers at your own tickets, and “our agents overbuild” turns from a suspicion into an audit you can run over a weekend.

The boundary is architecture. When the task is genuinely exploratory, API design or infrastructure built for reuse, soften the skill or switch it off. Everywhere else, this is the rare behavior patch that earns its keep the same afternoon you install it: less code by lunch, with the guardrails still up.

The Deck

Click the deck, then use ← → to advance

Executive cut ↗Open fullscreen ↗