Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dffe9eb822 | ||
|
|
cf9cbd531e | ||
|
|
10a375b836 | ||
|
|
f316f14d96 | ||
|
|
48cdf05a25 | ||
|
|
a4e5e479d6 |
@@ -32,6 +32,6 @@ End with `net: -<N> lines, -<M> deps possible.` Nothing to cut: `Lean already. S
|
||||
## Boundaries
|
||||
|
||||
Scope: over-engineering and complexity only. Correctness bugs, security holes,
|
||||
and performance are explicitly out of scope — route them to a normal review
|
||||
and performance are explicitly out of scope. Route them to a normal review
|
||||
pass. Lists findings, applies nothing. One-shot.
|
||||
"stop ponytail-audit" or "normal mode" to revert.
|
||||
|
||||
@@ -45,7 +45,7 @@ If there is nothing to cut, say `Lean already. Ship.` and stop.
|
||||
## Boundaries
|
||||
|
||||
Scope: over-engineering and complexity only. Correctness bugs, security holes,
|
||||
and performance are explicitly out of scope — route them to a normal review
|
||||
and performance are explicitly out of scope. Route them to a normal review
|
||||
pass, not this one. A single smoke test or `assert`-based
|
||||
self-check is the ponytail minimum, not bloat, never flag it for deletion.
|
||||
Does not apply the fixes, only lists them.
|
||||
|
||||
+37
-6
@@ -14,13 +14,17 @@
|
||||
<p align="center">
|
||||
<img src="https://img.shields.io/github/stars/DietrichGebert/ponytail?style=flat-square&color=111111&label=stars" alt="Stars">
|
||||
<img src="https://img.shields.io/github/v/release/DietrichGebert/ponytail?style=flat-square&color=111111&label=release" alt="Release">
|
||||
<img src="https://img.shields.io/badge/funciona%20con-13%20agentes-111111?style=flat-square" alt="Works with 13 agents">
|
||||
<img src="https://img.shields.io/badge/funciona%20con-14%20agentes-111111?style=flat-square" alt="Works with 14 agents">
|
||||
<img src="https://img.shields.io/badge/licencia-MIT-111111?style=flat-square" alt="MIT license">
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>80-94% menos código · 3-6× más rápido · 47-77% más barato</strong><br>
|
||||
<sub>Mediana de 10 ejecuciones con Haiku, Sonnet y Opus. <a href="benchmarks/">Reprodúcelo tú mismo.</a></sub>
|
||||
<strong>~54% menos código (hasta 94%) · ~20% más barato · ~27% más rápido · 100% seguro</strong><br>
|
||||
<sub>Medido en sesiones reales de Claude Code editando un repo open-source real (FastAPI + React), contra el mismo agente sin skill. ~54% es el promedio de 12 tareas de feature (Haiku 4.5, n=4); llega al 94% cuando un agente sobre-construye (un selector de fechas) y es casi cero cuando el código ya es mínimo. ponytail mantiene cada guarda de seguridad, mientras que un prompt pelado de "escribe one-liners" se salta una. (El benchmark anterior de un solo disparo reportaba 80-94% como cifra plana; contra un baseline agéntico justo, ese es el techo por tarea, no el promedio.) <a href="benchmarks/results/2026-06-18-agentic.md">Reporte completo</a> · <a href="benchmarks/">reprodúcelo</a>.</sub>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<sub>Traducción de la comunidad. La versión de referencia y más reciente es el <a href="README.md">README en inglés</a>.</sub>
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -44,13 +48,34 @@ Más sobrevivientes en [examples/](examples/).
|
||||
|
||||
## Números
|
||||
|
||||
Cinco tareas del día a día (validador de email, debounce, suma de CSV, temporizador, rate limiter), tres modelos, tres variantes: sin skill, el skill [caveman](https://github.com/JuliusBrussee/caveman), y ponytail. Diez ejecuciones por celda, mediana reportada.
|
||||
La medición honesta es un agente real haciendo trabajo real: una sesión headless de Claude Code editando [el template full-stack-fastapi de tiangolo](https://github.com/fastapi/full-stack-fastapi-template) (un repo real de FastAPI + React), evaluada sobre el `git diff` que deja. Doce tickets de feature, el mismo agente con y sin el skill, n=4, Haiku 4.5.
|
||||
|
||||
<p align="center">
|
||||
<img src="assets/benchmark-3model.svg" width="860" alt="Mediana de líneas de código por variante en Haiku, Sonnet y Opus; ponytail escribe 80-94% menos código que el baseline sin skill">
|
||||
<img src="assets/benchmark-agentic.svg" width="860" alt="Cada variante como porcentaje del baseline sin skill en LOC, tokens, costo y tiempo (Haiku 4.5). ponytail es el más bajo en cada métrica (LOC 46%, tokens 78%, costo 80%, tiempo 73%); caveman sube por encima del 100% en tokens, costo y tiempo; yagni-oneliner LOC 67%. Seguridad, tier adversarial aparte: baseline, caveman y ponytail 100%, yagni-oneliner 95%.">
|
||||
</p>
|
||||
|
||||
**80-94% menos código, 47-77% menos costo, y 3-6× más rápido que un agente sin skill, en todos los modelos.** Cada atajo que toma ponytail queda marcado en el código con un comentario `ponytail:` que nombra la ruta de actualización. Reprodúcelo: `npx promptfoo eval -c benchmarks/promptfooconfig.yaml`. Método y números completos: [benchmarks/](benchmarks/). Tareas de nivel producción, donde un agente sin restricciones se infla mucho más, están documentadas en [benchmarks/results/](benchmarks/results/).
|
||||
| vs baseline sin skill | LOC | tokens | costo | tiempo | seguro |
|
||||
|---|--:|--:|--:|--:|--:|
|
||||
| **ponytail** | **-54%** | **-22%** | **-20%** | **-27%** | **100%** |
|
||||
| caveman (control de prosa concisa) | -20% | +7% | +3% | +2% | 100% |
|
||||
| prompt "YAGNI + one-liners" | -33% | -14% | -21% | -30% | 95% |
|
||||
|
||||
ponytail es la única variante que recorta cada métrica, y la única que se mantiene totalmente segura al hacerlo. El recorte es mayor donde hay una trampa real de sobre-construcción (selector de fechas de 404 a 23 líneas, selector de color de 287 a 23, porque usa un `<input>` nativo en vez de un componente) y casi cero en código que ya es mínimo. Método completo, tablas por tarea y limitaciones: [benchmarks/results/2026-06-18-agentic.md](benchmarks/results/2026-06-18-agentic.md).
|
||||
|
||||
<details>
|
||||
<summary><strong>Números anteriores de un solo disparo (generación aislada)</strong></summary>
|
||||
|
||||
Cinco tareas del día a día, tres modelos, tres variantes (sin skill, [caveman](https://github.com/JuliusBrussee/caveman), ponytail), diez ejecuciones, mediana reportada. Un prompt, una completación, contando las líneas de la respuesta:
|
||||
|
||||
<p align="center">
|
||||
<img src="assets/benchmark-3model.svg" width="860" alt="Mediana de líneas de código por variante en Haiku, Sonnet y Opus">
|
||||
</p>
|
||||
|
||||
Esto mostraba **80-94% menos código**. [#126](https://github.com/DietrichGebert/ponytail/issues/126) señaló con razón que el baseline del modelo pelado infla su respuesta con prosa y opciones, así que esa diferencia es en parte un artefacto del baseline conversacional. Los números agénticos de arriba son la versión corregida y defendible. Reproduce la corrida de un solo disparo con `npx promptfoo eval -c benchmarks/promptfooconfig.yaml`.
|
||||
|
||||
</details>
|
||||
|
||||
**La regla nunca fue "menos tokens."** Es: escribe solo lo que la tarea necesita, y nunca recortes validación, manejo de errores, seguridad ni accesibilidad. El código termina pequeño porque es necesario, no por golf. El menor costo y latencia son un efecto secundario en los modelos que siguen la escalera; un modelo de razonamiento conciso que gasta tokens de pensamiento deliberando los peldaños puede ir al revés (en GPT-5.5 lo hace).
|
||||
|
||||
## Cómo funciona
|
||||
|
||||
@@ -80,6 +105,8 @@ Los plugins de Claude Code y Codex ejecutan dos pequeños lifecycle hooks de Nod
|
||||
/plugin install ponytail@ponytail
|
||||
```
|
||||
|
||||
La app de escritorio no tiene el comando `/plugin`. Instálala desde la interfaz: Customize, el + junto a los plugins personales, Create plugin and add marketplace, Add from repository, y luego ingresa la URL del repo (gracias @NiklasDHahn, #98).
|
||||
|
||||
### Codex
|
||||
|
||||
```bash
|
||||
@@ -148,6 +175,10 @@ agy plugin install https://github.com/DietrichGebert/ponytail
|
||||
|
||||
Reutiliza el `gemini-extension.json` de este repo. Una diferencia: Antigravity convierte los comandos `/ponytail` en skills, así que los escribes en el chat (por ejemplo `/ponytail-review` como mensaje) en vez de seleccionarlos de un menú slash. Hasta que la migración se complete (alrededor del 18 de junio de 2026), `gemini extensions install` también funciona. Para usarlo como regla permanente, coloca el ruleset en `.agents/rules/`.
|
||||
|
||||
### CodeWhale
|
||||
|
||||
Lee `AGENTS.md` desde la raíz del proyecto, sin configuración. Copia [`AGENTS.md`](AGENTS.md) a tu proyecto, o ejecuta `codewhale` desde un checkout de este repo. Eso es todo.
|
||||
|
||||
### OpenClaw
|
||||
|
||||
```bash
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
<sub>Measured on real Claude Code sessions editing a real open-source repo (FastAPI + React), against the same agent with no skill. ~54% is the mean across 12 feature tasks (Haiku 4.5, n=4); it reaches 94% where an agent over-builds (a date picker) and is near zero where the code is already minimal. ponytail keeps every safety guard while a bare "write one-liners" prompt drops one. (The earlier single-shot benchmark reported 80-94% as a flat figure; against a fair agentic baseline that is the per-task ceiling, not the average.) <a href="benchmarks/results/2026-06-18-agentic.md">Full writeup</a> · <a href="benchmarks/">reproduce it</a>.</sub>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<sub><a href="README.es.md">Español</a></sub>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
You know him. Long ponytail. Oval glasses. Has been at the company longer than the version control. You show him fifty lines; he looks at them, says nothing, and replaces them with one.
|
||||
@@ -42,8 +46,6 @@ With ponytail:
|
||||
|
||||
More survivors in [examples/](examples/).
|
||||
|
||||
> **Pairs well with** [Modern Web Guidance](https://github.com/GoogleChrome/modern-web-guidance) for web work: ponytail decides *whether* to lean on the platform, MWG is how the agent looks up *which* native feature does the job. See [examples/web-platform-lookup.md](examples/web-platform-lookup.md).
|
||||
|
||||
## Numbers
|
||||
|
||||
The honest measurement is a real agent doing real work: a headless Claude Code session editing [tiangolo's full-stack-fastapi-template](https://github.com/fastapi/full-stack-fastapi-template) (a real FastAPI + React repo), scored on the `git diff` it leaves behind. Twelve feature tickets, the same agent with and without the skill, n=4, Haiku 4.5.
|
||||
|
||||
@@ -1,6 +1,2 @@
|
||||
// Baseline arm: no skill, with a one-line system prompt so the model doesn't ramble.
|
||||
const system = 'Provide just one example for any given task, and no commentary or usage examples.';
|
||||
module.exports = ({ vars }) => [
|
||||
{ role: 'system', content: system },
|
||||
{ role: 'user', content: vars.task },
|
||||
];
|
||||
// Baseline arm: no skill, just the task.
|
||||
module.exports = ({ vars }) => [{ role: 'user', content: vars.task }];
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
# Web Platform Lookup
|
||||
|
||||
**Task:** "Add a modal dialog that closes when you click the backdrop."
|
||||
|
||||
Rung 3 of the ladder is "native platform feature covers it?" On web work the
|
||||
trap is that the agent forgets what the platform already does and reaches for a
|
||||
library. When ponytail has [Modern Web Guidance](https://github.com/GoogleChrome/modern-web-guidance)
|
||||
on hand, rung 3 gets a lookup: `modern-web search "modal dialog light dismiss"`.
|
||||
|
||||
## Without Ponytail
|
||||
|
||||
```bash
|
||||
npm install @radix-ui/react-dialog
|
||||
```
|
||||
|
||||
```jsx
|
||||
import * as Dialog from "@radix-ui/react-dialog";
|
||||
|
||||
export default function Modal({ open, onOpenChange, children }) {
|
||||
return (
|
||||
<Dialog.Root open={open} onOpenChange={onOpenChange}>
|
||||
<Dialog.Portal>
|
||||
<Dialog.Overlay className="overlay" />
|
||||
<Dialog.Content className="content">
|
||||
{children}
|
||||
<Dialog.Close className="close">×</Dialog.Close>
|
||||
</Dialog.Content>
|
||||
</Dialog.Portal>
|
||||
</Dialog.Root>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
A dependency, a portal, an overlay node, and controlled open state, to put a
|
||||
box on top with a backdrop.
|
||||
|
||||
## With Ponytail
|
||||
|
||||
`modern-web search "modal dialog light dismiss"` →
|
||||
`modern-web retrieve light-dismiss-a-dialog`. The platform has it:
|
||||
|
||||
```html
|
||||
<!-- ponytail: <dialog> + closedby, browser does the backdrop, focus trap, and Esc -->
|
||||
<dialog closedby="any">
|
||||
<p>...</p>
|
||||
</dialog>
|
||||
```
|
||||
|
||||
```js
|
||||
document.querySelector("dialog").showModal();
|
||||
```
|
||||
|
||||
**1 dependency + portal/overlay machinery → 0 dependencies + a `<dialog>`.**
|
||||
The `::backdrop` is free, focus is trapped and restored for you, `Esc` closes
|
||||
it, and `closedby="any"` adds click-outside dismissal. The browser team did the
|
||||
work.
|
||||
|
||||
## The point
|
||||
|
||||
MWG suggests the cutting edge, ponytail keeps only the rung that holds. The
|
||||
lookup found `light-dismiss-a-dialog`; the ladder took it because it deletes a
|
||||
dependency. The same search would have offered scroll-driven animations and
|
||||
view transitions for other tasks, and the ladder would have skipped them when
|
||||
the task didn't need them. Lookup, not license.
|
||||
@@ -2,9 +2,9 @@
|
||||
"name": "ponytail-mcp",
|
||||
"version": "0.1.0",
|
||||
"description": "MCP server that serves Ponytail's lazy-senior-dev instructions as a prompt and a tool.",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"bin": { "ponytail-mcp": "./index.js" },
|
||||
"scripts": { "test": "node --test ./test/*.test.js" },
|
||||
"dependencies": {
|
||||
"@modelcontextprotocol/sdk": "^1.19.0",
|
||||
|
||||
@@ -36,6 +36,6 @@ End with `net: -<N> lines, -<M> deps possible.` Nothing to cut: `Lean already. S
|
||||
## Boundaries
|
||||
|
||||
Scope: over-engineering and complexity only. Correctness bugs, security holes,
|
||||
and performance are explicitly out of scope — route them to a normal review
|
||||
and performance are explicitly out of scope. Route them to a normal review
|
||||
pass. Lists findings, applies nothing. One-shot.
|
||||
"stop ponytail-audit" or "normal mode" to revert.
|
||||
|
||||
@@ -50,7 +50,7 @@ If there is nothing to cut, say `Lean already. Ship.` and stop.
|
||||
## Boundaries
|
||||
|
||||
Scope: over-engineering and complexity only. Correctness bugs, security holes,
|
||||
and performance are explicitly out of scope — route them to a normal review
|
||||
and performance are explicitly out of scope. Route them to a normal review
|
||||
pass, not this one. A single smoke test or `assert`-based
|
||||
self-check is the ponytail minimum, not bloat, never flag it for deletion.
|
||||
Does not apply the fixes, only lists them.
|
||||
|
||||
@@ -40,16 +40,6 @@ Stop at the first rung that holds:
|
||||
The ladder is a reflex, not a research project. Two rungs work → take the
|
||||
higher one and move on. The first lazy solution that works is the right one.
|
||||
|
||||
## Web tasks: rung 3 lookup
|
||||
|
||||
On web work, rung 3 is where the laziest win hides: a native element or CSS
|
||||
behavior the agent forgot exists. If a web task turns on whether the platform
|
||||
covers it (a date input, dialog, popover, view transition, container query),
|
||||
and the `modern-web` CLI is available, look it up: `modern-web search "<task>"`,
|
||||
then `modern-web retrieve <id>`. It is a lookup, not a license, the answer
|
||||
still goes through the ladder. MWG suggests the cutting edge; you keep only the
|
||||
rung that holds. Not installed? Skip it, the ladder runs fine without it.
|
||||
|
||||
## Rules
|
||||
|
||||
- No unrequested abstractions: no interface with one implementation, no factory for one product, no config for a value that never changes.
|
||||
|
||||
Reference in New Issue
Block a user