@dietrichgebert/ponytail 4.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/.opencode/command/ponytail-audit.md +5 -0
  2. package/.opencode/command/ponytail-debt.md +5 -0
  3. package/.opencode/command/ponytail-gain.md +5 -0
  4. package/.opencode/command/ponytail-help.md +5 -0
  5. package/.opencode/command/ponytail-review.md +5 -0
  6. package/.opencode/command/ponytail.md +5 -0
  7. package/.opencode/plugins/ponytail.mjs +100 -0
  8. package/AGENTS.md +32 -0
  9. package/LICENSE +21 -0
  10. package/README.es.md +250 -0
  11. package/README.md +289 -0
  12. package/assets/benchmark-3model.svg +21 -0
  13. package/assets/benchmark-agentic.svg +62 -0
  14. package/assets/logo-dark.png +0 -0
  15. package/assets/logo-dark.svg +115 -0
  16. package/assets/logo.png +0 -0
  17. package/assets/social-preview.png +0 -0
  18. package/hooks/claude-codex-hooks.json +31 -0
  19. package/hooks/copilot-hooks.json +21 -0
  20. package/hooks/ponytail-activate.js +91 -0
  21. package/hooks/ponytail-config.js +122 -0
  22. package/hooks/ponytail-instructions.js +94 -0
  23. package/hooks/ponytail-mode-tracker.js +55 -0
  24. package/hooks/ponytail-runtime.js +51 -0
  25. package/hooks/ponytail-statusline.ps1 +21 -0
  26. package/hooks/ponytail-statusline.sh +12 -0
  27. package/package.json +43 -0
  28. package/pi-extension/index.js +189 -0
  29. package/pi-extension/package.json +8 -0
  30. package/pi-extension/test/extension.test.js +167 -0
  31. package/pi-extension/test/helpers.test.js +92 -0
  32. package/skills/ponytail/SKILL.md +117 -0
  33. package/skills/ponytail-audit/SKILL.md +41 -0
  34. package/skills/ponytail-debt/SKILL.md +44 -0
  35. package/skills/ponytail-gain/SKILL.md +50 -0
  36. package/skills/ponytail-help/SKILL.md +69 -0
  37. package/skills/ponytail-review/SKILL.md +57 -0
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Audit the whole repo for over-engineering, what can be deleted
3
+ ---
4
+
5
+ Audit the entire repository for over-engineering only, not correctness. Scan the whole tree, not a diff. One line per finding, ranked biggest cut first: <tag> <what to cut>. <replacement>. [path]. Tags: delete (dead code/speculative feature), stdlib (reinvented standard library), native (dependency doing what the platform does), yagni (abstraction with one implementation), shrink (same logic, fewer lines). End with the net lines and dependencies removable. If nothing to cut: 'Lean already. Ship.'
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: "Harvest ponytail: comments into a tracked debt ledger"
3
+ ---
4
+
5
+ Harvest every `ponytail:` comment in this repository into a debt ledger so deferrals do not rot into 'later means never'. Grep the whole tree for comment markers (grep -rnE '(#|//) ?ponytail:' ., skipping node_modules/.git/build output). One row per marker, grouped by file: <file>:<line>, <what was simplified>. ceiling: <the limit named in the comment>. upgrade: <the trigger to revisit>. Tag any marker that names no upgrade path or trigger as no-trigger, those rot silently. End with the count of markers and how many lack a trigger. If none: 'No ponytail: debt. Clean ledger.' Report only, change nothing.
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Show ponytail's measured impact scoreboard (less code, cost, time)
3
+ ---
4
+
5
+ Show the ponytail gain scoreboard. One shot, change nothing: do not switch mode, write flag files, or persist anything. Render the published benchmark medians (5 everyday tasks; models Haiku, Sonnet, Opus; source benchmarks/ and the README) as plain ASCII bars: Lines of code, no-skill 100% vs ponytail 6-20% (down 80-94%); Cost, no-skill 100% vs ponytail 23-53% (down 47-77%); Speed, ponytail 3-6x faster. The bar length shows the measured range, the label carries the exact figure. These are benchmark medians, not this repo. NEVER print a per-repo savings number: the unbuilt version was never written, so there is no real baseline to subtract from in a live repo. For real per-repo figures, point to /ponytail-debt (the counted shortcut ledger) and /ponytail-audit (what is still cuttable). Report only.
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Quick reference for ponytail levels, skills, and commands
3
+ ---
4
+
5
+ Show the ponytail quick reference. One shot, change nothing: do not switch mode, write flag files, or persist anything. Levels: /ponytail lite (build what's asked, name the lazier alternative in one line), /ponytail (full, the default ladder: YAGNI then stdlib then native then one line then minimum), /ponytail ultra (deletion before addition, challenges the requirement before building). Commands: /ponytail-review (over-engineering review of the current changes), /ponytail-audit (whole-repo over-engineering audit), /ponytail-debt (harvest ponytail: comments into a tracked ledger), /ponytail-help (this card). Deactivate with 'stop ponytail', 'normal mode', or /ponytail off; resume anytime with /ponytail. Default mode is full; change it with the PONYTAIL_DEFAULT_MODE environment variable (off|lite|full|ultra) or a config file at ~/.config/ponytail/config.json (Windows: %APPDATA%\ponytail\config.json) with {"defaultMode": "lite"}. Resolution order: env var, then config file, then full.
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Review changes for over-engineering, what can be deleted
3
+ ---
4
+
5
+ Review the current code changes for over-engineering only, not correctness. One line per finding: L<line>: <tag> <what to cut>. <replacement>. Tags: delete (dead code/speculative feature), stdlib (reinvented standard library), native (dependency doing what the platform does), yagni (abstraction with one implementation), shrink (same logic, fewer lines). End with the net lines removable. If nothing to cut: 'Lean already. Ship.'
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Switch ponytail intensity level (lite/full/ultra/off)
3
+ ---
4
+
5
+ Switch to ponytail $ARGUMENTS mode. If no level specified, use full. Lazy senior dev mode, before any code: does it need to exist at all (YAGNI)? Does the standard library do it? A native platform feature? Can it be one line? Build the minimum that works. No unrequested abstractions, no avoidable dependencies, no boilerplate. Mark intentional simplifications with a ponytail: comment.
@@ -0,0 +1,100 @@
1
+ // ponytail — OpenCode plugin.
2
+ //
3
+ // Injects the ponytail ruleset into every chat's system prompt at the active
4
+ // intensity, persists /ponytail mode switches, and registers slash commands so
5
+ // they work when the package is installed from npm. Reuses the shared
6
+ // instruction builder so Claude Code, Codex, pi, and OpenCode all read one
7
+ // source of truth.
8
+ //
9
+ // OpenCode loads this as a server plugin — add it to your opencode.json:
10
+ // { "plugin": ["@dietrichgebert/ponytail"] }
11
+
12
+ import { createRequire } from 'module';
13
+ import fs from 'fs';
14
+ import os from 'os';
15
+ import path from 'path';
16
+ import { fileURLToPath } from 'url';
17
+
18
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
19
+
20
+ // The shared instruction builder is CommonJS; bridge to it from this ES module.
21
+ const require = createRequire(import.meta.url);
22
+ const { getPonytailInstructions } = require('../../hooks/ponytail-instructions');
23
+ const { getDefaultMode, normalizePersistedMode } = require('../../hooks/ponytail-config');
24
+
25
+ // OpenCode has no flag-file convention of its own; keep mode beside its config.
26
+ const statePath = path.join(
27
+ process.env.XDG_CONFIG_HOME || path.join(os.homedir(), '.config'),
28
+ 'opencode',
29
+ '.ponytail-active',
30
+ );
31
+
32
+ function readMode() {
33
+ try {
34
+ return normalizePersistedMode(fs.readFileSync(statePath, 'utf8').trim()) || getDefaultMode();
35
+ } catch (e) {
36
+ return getDefaultMode();
37
+ }
38
+ }
39
+
40
+ function writeMode(mode) {
41
+ fs.mkdirSync(path.dirname(statePath), { recursive: true });
42
+ fs.writeFileSync(statePath, mode);
43
+ }
44
+
45
+ export function parseCommandFile(filePath) {
46
+ const content = fs.readFileSync(filePath, 'utf8');
47
+ // Tolerate CRLF: a Windows checkout (autocrlf) delivers \r\n, npm ships \n.
48
+ const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n([\s\S]*)$/);
49
+ if (!match) return null;
50
+ const description = match[1].match(/description:\s*(.+)/)?.[1]?.trim();
51
+ return { description, template: match[2].trim() };
52
+ }
53
+
54
+ export default async ({ client } = {}) => {
55
+ const log = (level, message) => {
56
+ try { client && client.app && client.app.log({ body: { service: 'ponytail', level, message } }); } catch (e) {}
57
+ };
58
+
59
+ const ponytailSkillsDir = path.resolve(__dirname, '../../skills');
60
+
61
+ return {
62
+ // Register slash commands + skills directory.
63
+ config: async (config) => {
64
+ if (!config.command) config.command = {};
65
+ const commandDir = path.join(__dirname, '..', 'command');
66
+ try {
67
+ for (const file of fs.readdirSync(commandDir).filter((f) => f.endsWith('.md'))) {
68
+ const name = path.basename(file, '.md');
69
+ const parsed = parseCommandFile(path.join(commandDir, file));
70
+ if (parsed) config.command[name] = parsed;
71
+ }
72
+ } catch (e) {}
73
+
74
+ config.skills = config.skills || {};
75
+ config.skills.paths = config.skills.paths || [];
76
+ if (!config.skills.paths.includes(ponytailSkillsDir)) {
77
+ config.skills.paths.push(ponytailSkillsDir);
78
+ }
79
+ },
80
+
81
+ // Append the ruleset to the system prompt every turn.
82
+ 'experimental.chat.system.transform': async (_input, output) => {
83
+ const mode = readMode();
84
+ if (mode === 'off') return;
85
+ output.system.push(getPonytailInstructions(mode));
86
+ },
87
+
88
+ // Persist `/ponytail <level>` so the next turn's injection follows it.
89
+ // ponytail: mode applies from the next message, not the current one — the
90
+ // transform reads the flag the command writes. Good enough; switch to a
91
+ // synchronous store if same-turn switching ever matters.
92
+ 'command.execute.before': async (input) => {
93
+ if (!input || input.command !== 'ponytail') return;
94
+ // `off` is persisted like any mode; the transform reads it and stays silent.
95
+ const mode = normalizePersistedMode((input.arguments || '').trim()) || getDefaultMode();
96
+ writeMode(mode);
97
+ log('info', 'ponytail ' + mode);
98
+ },
99
+ };
100
+ };
package/AGENTS.md ADDED
@@ -0,0 +1,32 @@
1
+ # Ponytail, lazy senior dev mode
2
+
3
+ You are a lazy senior developer. Lazy means efficient, not careless. The best code is the code never written.
4
+
5
+ Before writing any code, stop at the first rung that holds:
6
+
7
+ 1. Does this need to be built at all? (YAGNI)
8
+ 2. Does it already exist in this codebase? Reuse the helper, util, or pattern that's already here, don't re-write it.
9
+ 3. Does the standard library already do this? Use it.
10
+ 4. Does a native platform feature cover it? Use it.
11
+ 5. Does an already-installed dependency solve it? Use it.
12
+ 6. Can this be one line? Make it one line.
13
+ 7. Only then: write the minimum code that works.
14
+
15
+ The ladder runs after you understand the problem, not instead of it: read the task and the code it touches, trace the real flow end to end, then climb.
16
+
17
+ Bug fix = root cause, not symptom: a report names a symptom. Grep every caller of the function you touch and fix the shared function once — one guard there is a smaller diff than one per caller, and patching only the path the ticket names leaves a sibling caller still broken.
18
+
19
+ Rules:
20
+
21
+ - No abstractions that weren't explicitly requested.
22
+ - No new dependency if it can be avoided.
23
+ - No boilerplate nobody asked for.
24
+ - Deletion over addition. Boring over clever. Fewest files possible.
25
+ - Shortest working diff wins, but only once you understand the problem. The smallest change in the wrong place isn't lazy, it's a second bug.
26
+ - Question complex requests: "Do you actually need X, or does Y cover it?"
27
+ - Pick the edge-case-correct option when two stdlib approaches are the same size, lazy means less code, not the flimsier algorithm.
28
+ - Mark intentional simplifications with a `ponytail:` comment. If the shortcut has a known ceiling (global lock, O(n²) scan, naive heuristic), the comment names the ceiling and the upgrade path.
29
+
30
+ Not lazy about: understanding the problem (read it fully and trace the real flow before picking a rung, a small diff you don't understand is just laziness dressed up as efficiency), input validation at trust boundaries, error handling that prevents data loss, security, accessibility, the calibration real hardware needs (the platform is never the spec ideal, a clock drifts, a sensor reads off), anything explicitly requested. Lazy code without its check is unfinished: non-trivial logic leaves ONE runnable check behind, the smallest thing that fails if the logic breaks (an assert-based demo/self-check or one small test file; no frameworks, no fixtures). Trivial one-liners need no test.
31
+
32
+ (Yes, this file also applies to agents working on the ponytail repo itself. Especially to them.)
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DietrichGebert
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.es.md ADDED
@@ -0,0 +1,250 @@
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="assets/logo-dark.png">
4
+ <img src="assets/logo.png" width="220" alt="Ponytail, el senior dev flojo">
5
+ </picture>
6
+ </p>
7
+
8
+ <h1 align="center">Ponytail</h1>
9
+
10
+ <p align="center">
11
+ <em>No dice nada. Escribe una línea. Funciona.</em>
12
+ </p>
13
+
14
+ <p align="center">
15
+ <img src="https://img.shields.io/github/stars/DietrichGebert/ponytail?style=flat-square&color=111111&label=stars" alt="Stars">
16
+ <img src="https://img.shields.io/github/v/release/DietrichGebert/ponytail?style=flat-square&color=111111&label=release" alt="Release">
17
+ <img src="https://img.shields.io/badge/funciona%20con-14%20agentes-111111?style=flat-square" alt="Works with 14 agents">
18
+ <img src="https://img.shields.io/badge/licencia-MIT-111111?style=flat-square" alt="MIT license">
19
+ </p>
20
+
21
+ <p align="center">
22
+ <strong>~54% menos código (hasta 94%) &middot; ~20% más barato &middot; ~27% más rápido &middot; 100% seguro</strong><br>
23
+ <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> &middot; <a href="benchmarks/">reprodúcelo</a>.</sub>
24
+ </p>
25
+
26
+ <p align="center">
27
+ <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>
28
+ </p>
29
+
30
+ ---
31
+
32
+ Lo conoces. Cola de caballo larga. Lentes ovalados. Lleva más tiempo en la empresa que el control de versiones. Le muestras cincuenta líneas; las mira, no dice nada, y las reemplaza por una.
33
+
34
+ Ponytail lo pone dentro de tu agente de IA.
35
+
36
+ ## Antes / después
37
+
38
+ Le pides un selector de fechas. Tu agente instala flatpickr, escribe un componente wrapper, agrega un stylesheet, y empieza una discusión sobre zonas horarias.
39
+
40
+ Con ponytail:
41
+
42
+ ```html
43
+ <!-- ponytail: el browser ya tiene uno -->
44
+ <input type="date">
45
+ ```
46
+
47
+ Más sobrevivientes en [examples/](examples/).
48
+
49
+ ## Números
50
+
51
+ 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.
52
+
53
+ <p align="center">
54
+ <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%.">
55
+ </p>
56
+
57
+ | vs baseline sin skill | LOC | tokens | costo | tiempo | seguro |
58
+ |---|--:|--:|--:|--:|--:|
59
+ | **ponytail** | **-54%** | **-22%** | **-20%** | **-27%** | **100%** |
60
+ | caveman (control de prosa concisa) | -20% | +7% | +3% | +2% | 100% |
61
+ | prompt "YAGNI + one-liners" | -33% | -14% | -21% | -30% | 95% |
62
+
63
+ 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).
64
+
65
+ <details>
66
+ <summary><strong>Números anteriores de un solo disparo (generación aislada)</strong></summary>
67
+
68
+ 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:
69
+
70
+ <p align="center">
71
+ <img src="assets/benchmark-3model.svg" width="860" alt="Mediana de líneas de código por variante en Haiku, Sonnet y Opus">
72
+ </p>
73
+
74
+ 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`.
75
+
76
+ </details>
77
+
78
+ **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).
79
+
80
+ ## Cómo funciona
81
+
82
+ Antes de escribir código, el agente se detiene en el primer peldaño que aguanta:
83
+
84
+ ```
85
+ 1. ¿Necesita existir esto? → no: omitirlo (YAGNI)
86
+ 2. ¿Ya existe en este código? → reúsalo, no lo reescribas
87
+ 3. ¿Lo hace la stdlib? → úsala
88
+ 4. ¿Es una feature nativa? → úsala
89
+ 5. ¿Una dependencia ya instalada? → úsala
90
+ 6. ¿Cabe en una línea? → una línea
91
+ 7. Solo entonces: el mínimo que funciona
92
+ ```
93
+
94
+ La escalera se recorre *después* de entender el problema, no en su lugar: lee el código que toca el cambio y sigue el flujo real antes de elegir un peldaño. Flojo en la solución, nunca en la lectura.
95
+
96
+ Flojo, no negligente: la validación en límites de confianza, el manejo de pérdida de datos, la seguridad y la accesibilidad nunca están en riesgo.
97
+
98
+ ## Instalación
99
+
100
+ El mayor esfuerzo que ponytail te va a pedir:
101
+
102
+ Los plugins de Claude Code y Codex ejecutan dos pequeños lifecycle hooks de Node.js, así que `node` debe estar en tu PATH (nota para usuarios de Nix/nvm: debe estar en el PATH del shell no-interactivo). Si no lo está, los skills igualmente funcionan, la activación automática simplemente queda en silencio en vez de lanzar un error en cada prompt.
103
+
104
+ ### Claude Code
105
+
106
+ ```
107
+ /plugin marketplace add DietrichGebert/ponytail
108
+ /plugin install ponytail@ponytail
109
+ ```
110
+
111
+ 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).
112
+
113
+ ### Codex
114
+
115
+ ```bash
116
+ codex plugin marketplace add DietrichGebert/ponytail
117
+ codex
118
+ ```
119
+
120
+ Abre `/plugins`, selecciona el marketplace de Ponytail e instala Ponytail. Luego abre `/hooks`, revisa y autoriza sus dos lifecycle hooks, y empieza un nuevo hilo.
121
+
122
+ Esta misma instalación cubre también la app de escritorio de Codex: reinicia la app después de instalar y detecta el plugin automáticamente.
123
+
124
+ ### GitHub Copilot CLI
125
+
126
+ ```bash
127
+ copilot plugin marketplace add DietrichGebert/ponytail
128
+ copilot plugin install ponytail@ponytail
129
+ ```
130
+
131
+ En una sesión interactiva de Copilot CLI, usa los equivalentes con slash:
132
+
133
+ ```
134
+ /plugin marketplace add DietrichGebert/ponytail
135
+ /plugin install ponytail@ponytail
136
+ ```
137
+
138
+ Copilot CLI agrupa los comandos del plugin bajo el nombre del plugin. Por ejemplo:
139
+
140
+ ```text
141
+ /ponytail:ponytail ultra
142
+ /ponytail:ponytail-review
143
+ ```
144
+
145
+ ### Pi agent harness
146
+
147
+ ```
148
+ pi install git:github.com/DietrichGebert/ponytail
149
+ ```
150
+
151
+ ### OpenCode
152
+
153
+ Ejecuta OpenCode desde un checkout de este repo (el plugin reutiliza sus `hooks/` y `skills/`), y agrega esto a `opencode.json`:
154
+
155
+ ```json
156
+ { "plugin": ["./.opencode/plugins/ponytail.mjs"] }
157
+ ```
158
+
159
+ Inyecta el ruleset en cada turno con el nivel activo; agrega los comandos `/ponytail` (ver [Comandos](#comandos)). OpenCode también carga automáticamente el `AGENTS.md` de este repo, así que las reglas aplican incluso sin el plugin. El plugin agrega los niveles `lite/full/ultra/off`.
160
+
161
+ El path `./` se resuelve contra el `opencode.json` de tu proyecto; para compartir un único checkout entre proyectos, apunta al path absoluto del `.mjs` (encuentra sus `hooks/` y `skills/` relativo a su propio archivo).
162
+
163
+ ### Gemini CLI
164
+
165
+ ```bash
166
+ gemini extensions install https://github.com/DietrichGebert/ponytail
167
+ ```
168
+
169
+ Carga el ruleset como contexto permanente en cada sesión y registra los comandos `/ponytail`; los `skills/` también se incluyen, activados cuando una tarea los necesita.
170
+
171
+ ### Antigravity CLI
172
+
173
+ Google está renombrando Gemini CLI a Antigravity CLI (el binario `agy`); la misma extensión se instala ahí:
174
+
175
+ ```bash
176
+ agy plugin install https://github.com/DietrichGebert/ponytail
177
+ ```
178
+
179
+ 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/`.
180
+
181
+ ### CodeWhale
182
+
183
+ 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.
184
+
185
+ ### OpenClaw
186
+
187
+ ```bash
188
+ clawhub install ponytail
189
+ ```
190
+
191
+ Instala ponytail como skill de OpenClaw desde ClawHub; los skills de review, audit, debt y help se instalan igual (`clawhub install ponytail-review`, etc.). OpenClaw lo aplica en tareas de código y también lo expone como comando `/ponytail`. Sin ClawHub, copia [`.openclaw/skills/ponytail`](.openclaw/skills/) a `~/.openclaw/skills/`.
192
+
193
+ Eso fue todo. Él estaría orgulloso. No lo va a decir.
194
+
195
+ Activo en cada sesión, con un puñado de comandos (ver [Comandos](#comandos)). `/ponytail ultra` existe para cuando el codebase te hizo algo personal. El texto de inicio y de cambio de modo muestra el nivel activo.
196
+
197
+ Configura el nivel para cada nueva sesión con la variable de entorno `PONYTAIL_DEFAULT_MODE` (`lite`/`full`/`ultra`/`off`), o con un campo `defaultMode` en `~/.config/ponytail/config.json` (`%APPDATA%\ponytail\config.json` en Windows). El default es `full`.
198
+
199
+ Cursor, Windsurf, Cline, GitHub Copilot (editor), Aider, Kiro: copia el archivo de reglas correspondiente de este repo ([`.cursor/rules/`](.cursor/rules/), [`.windsurf/rules/`](.windsurf/rules/), [`.clinerules/`](.clinerules/), [`.github/copilot-instructions.md`](.github/copilot-instructions.md), [`AGENTS.md`](AGENTS.md), [`.kiro/steering/`](.kiro/steering/)).
200
+
201
+ Kiro: copia `.kiro/steering/ponytail.md` a `~/.kiro/steering/` (global) o `.kiro/steering/` en tu proyecto.
202
+
203
+ Fallback de GitHub Copilot CLI (modo solo instrucciones): lee `AGENTS.md` y `.github/copilot-instructions.md` en un proyecto, o copia las reglas a `~/.copilot/copilot-instructions.md` para ejecutar ponytail en todos tus proyectos. Esta vía mantiene la guía permanente, pero no agrega switches de modo ni hooks.
204
+
205
+ VS Code con la extensión Codex lee `AGENTS.md`, que este repo incluye, así que funciona desde la raíz del repo sin configuración adicional (`~/.codex/AGENTS.md` hace a Codex global).
206
+
207
+ Qué archivos corresponden a qué agente: [Portabilidad de agentes](docs/agent-portability.md).
208
+
209
+ ## Comandos
210
+
211
+ | Comando | Qué hace |
212
+ |---------|----------|
213
+ | `/ponytail [lite \| full \| ultra \| off]` | Cambia la intensidad, o apágalo. Sin argumento, reporta el nivel actual. |
214
+ | `/ponytail-review` | Revisa el diff actual en busca de sobre-ingeniería y devuelve una lista de qué eliminar. |
215
+ | `/ponytail-audit` | Audita el repo completo en busca de sobre-ingeniería, no solo el diff. |
216
+ | `/ponytail-debt` | Recolecta los atajos marcados con `ponytail:` que dejaste pendientes en un registro, para que "después" no se convierta en "nunca". |
217
+ | `/ponytail-help` | Referencia rápida de los comandos anteriores. |
218
+
219
+ Los comandos requieren un host compatible con skills (Claude Code, Codex, OpenCode, Gemini, pi). En Codex son skills; se invocan con `@` (`@ponytail-review`). Los adaptadores de solo instrucciones (Cursor, Windsurf, Cline, Copilot, Kiro, Antigravity) cargan el ruleset permanente sin los comandos.
220
+
221
+ ## Desarrollo
222
+
223
+ Al cambiar el texto compacto de las reglas, mantén alineadas las copias en los adaptadores:
224
+
225
+ ```bash
226
+ node scripts/check-rule-copies.js
227
+ npm test
228
+ ```
229
+
230
+ El paquete de skills de OpenClaw (`.openclaw/skills/`) se genera desde `skills/`; ejecuta `node scripts/build-openclaw-skills.js` después de cambiar un skill, la suite de tests falla si está desactualizado.
231
+
232
+ El benchmark de correctness lanza Python para las verificaciones de email y CSV; se prueba `python3` antes que `python`. Las verificaciones de CSV requieren `pandas` instalado localmente.
233
+
234
+ ## FAQ
235
+
236
+ **¿Necesita un archivo de configuración?**
237
+ No. Un opcional `~/.config/ponytail/config.json` o la variable `PONYTAIL_DEFAULT_MODE` pueden fijar el nivel default, pero nada es obligatorio.
238
+
239
+ **¿Y si realmente necesito la clase de caché de 120 líneas?**
240
+ No la necesitas. Insiste de todas formas y él la va a construir. Despacio. Correctamente. Mirándote.
241
+
242
+ **¿Escala?**
243
+ El código que nunca escribiste escala infinitamente. Cero bugs, cero CVEs, 100% uptime desde siempre.
244
+
245
+ **¿Por qué "ponytail"?**
246
+ Ya sabes exactamente por qué.
247
+
248
+ ## Licencia
249
+
250
+ [MIT](LICENSE). La licencia más corta que funciona.