MONOSPACE


CRAFTNº 005

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 AI agent writes is the code nobody asked for: the framework where a function would do, the dependency where the standard library already ships the answer. Ponytail — 35,000 stars for what is mostly Markdown — attacks exactly that failure mode. It is not a static analyzer and not a code generator; it is a behavior patch, installed as a skill, that changes what an agent reaches for first.

The Premise

Before writing anything, the agent must stop at the first rung of a six-step ladder that works: skip it entirely, use the standard library, use the platform’s native feature, use an installed dependency, write one line, or — last resort — write the minimum code. The design decision that elevates it above a YAGNI slogan is the safety carve-out: validation, data-loss handling, security, accessibility, and explicit requirements must never be simplified away.

The whole product is a decision ladder.

The Machine

The engineering is thin by intention: one canonical skill file, a compact always-on fallback, and two small hook scripts, with adapters for ten agent families — Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more — sharing the same rules. Three intensity modes scale the pressure from gentle suggestions to bloat-reduction-as-primary-objective. Total footprint: about 6,500 lines, zero declared dependencies.

The Test Drive

Locally, everything checkable checked out: 62 of 62 tests passed, eight rule invariants verified aligned across every adapter, and the benchmark’s safety scorers correctly classified good and bad reference implementations across path traversal, SQL injection, and HMAC verification. The study is explicit that it ran no live model A/B — no API keys were present, and it did not fake model results.

The strongest evidence is the repo’s own corrected agentic benchmark: real Claude Code sessions against twelve feature tickets on a pinned FastAPI + React app, scored by added lines in git diff. Ponytail cut lines of code 54%, tokens 22%, cost 20%, and time 27% — while keeping a 100% safety rate. The tellingly honest control: a bare “YAGNI” one-liner prompt got decent numbers too, but dropped a path-traversal guard. The ladder’s safety rails are what you’re actually installing.

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

The Fine Print

No critical issues in the distributable surface, no real credentials anywhere, and a zero-dependency design that leaves nothing for npm audit to flag — though the missing lockfile hurts reproducibility, and the benchmark graders execute generated code, so run those only in throwaway environments.

The Verdict

Ponytail earns its trial because it attacks a common failure mode with small integration cost and unusually explicit safety boundaries. Install it for agent-assisted coding; turn it off when the task genuinely is architecture. A guardrail, not an architectural brain.

The Deck

Click the deck, then use ← → to advance

Executive cut ↗Open fullscreen ↗