From 15749f7ffc94c84ce7be3c000dcefb322ec1eeee Mon Sep 17 00:00:00 2001 From: Ben Younes Date: Fri, 19 Jun 2026 00:24:37 +0200 Subject: [PATCH] feat(skills): add /ponytail-gain measured-impact scoreboard (#108) A one-shot scoreboard showing ponytail's measured benchmark impact (less code, less cost, more speed) as plain ASCII bars, then points to /ponytail-debt and /ponytail-audit for this repo's real numbers. Complements the existing skills rather than duplicating them: debt harvests the ponytail: ledger, audit finds what's cuttable, gain shows the measured why-it-matters. No per-repo savings number is ever printed -- the unbuilt version was never written, so there is no real baseline to subtract from in a live repo. The bars carry the published benchmark medians (5 tasks, 3 models); per-repo figures come from debt's count. Ships every adapter the other commands ship: Claude commands/*.toml, OpenCode .opencode/command/*.md, OpenClaw skill (generated), Pi command registration. Help card, command enumeration, portability table, and README updated in the same change. Co-authored-by: Claude Opus 4.8 (1M context) --- .openclaw/skills/ponytail-gain/SKILL.md | 47 +++++++++++++++++++++++ .openclaw/skills/ponytail-help/SKILL.md | 1 + .opencode/command/ponytail-gain.md | 5 +++ README.md | 3 +- commands/ponytail-gain.toml | 2 + commands/ponytail-help.toml | 2 +- docs/agent-portability.md | 1 + pi-extension/index.js | 5 +++ pi-extension/test/extension.test.js | 4 +- scripts/build-openclaw-skills.js | 1 + skills/ponytail-gain/SKILL.md | 50 +++++++++++++++++++++++++ skills/ponytail-help/SKILL.md | 1 + 12 files changed, 119 insertions(+), 3 deletions(-) create mode 100644 .openclaw/skills/ponytail-gain/SKILL.md create mode 100644 .opencode/command/ponytail-gain.md create mode 100644 commands/ponytail-gain.toml create mode 100644 skills/ponytail-gain/SKILL.md diff --git a/.openclaw/skills/ponytail-gain/SKILL.md b/.openclaw/skills/ponytail-gain/SKILL.md new file mode 100644 index 0000000..1fdb04d --- /dev/null +++ b/.openclaw/skills/ponytail-gain/SKILL.md @@ -0,0 +1,47 @@ +--- +name: ponytail-gain +description: "Show ponytail measured impact as a scoreboard: less code, less cost, more speed, from the benchmark medians. One-shot display." +homepage: https://github.com/DietrichGebert/ponytail +license: MIT +--- + +# Ponytail Gain + +Display this scoreboard when invoked. One-shot: do NOT change mode, write flag +files, or persist anything. + +The figures are the published benchmark medians (5 everyday tasks: email +validator, debounce, CSV sum, countdown timer, rate limiter; three models: +Haiku, Sonnet, Opus). They are measured, not computed from the current repo. +Source: `benchmarks/` and the README. + +## Scoreboard + +Render plain ASCII bars. The bar length shows the measured range; the label +carries the exact figure: + +``` + ponytail gain benchmark median · 5 tasks · 3 models + + Lines of code no-skill ████████████████████ 100% + ponytail ██▌················· 6–20% ▼ 80–94% + Cost no-skill ████████████████████ 100% + ponytail █████▌·············· 23–53% ▼ 47–77% + Speed ponytail ▸ 3–6× faster + + This repo: /ponytail-debt (shortcuts you deferred) + /ponytail-audit (what's still cuttable) +``` + +## Honesty boundary + +These are benchmark medians, not this repo. NEVER print a per-repo savings +number ("you saved X lines/tokens here"): the unbuilt version was never +written, so there is no real baseline to subtract from in a live repo. The +only real per-repo figures come from `/ponytail-debt` (a counted ledger), and +this card points there instead of inventing one. + +## Boundaries + +One-shot display. Edits nothing, changes no mode. +"stop ponytail" or "normal mode": revert. diff --git a/.openclaw/skills/ponytail-help/SKILL.md b/.openclaw/skills/ponytail-help/SKILL.md index 33684fa..1d59c9e 100644 --- a/.openclaw/skills/ponytail-help/SKILL.md +++ b/.openclaw/skills/ponytail-help/SKILL.md @@ -26,6 +26,7 @@ Level sticks until changed or session end. |-------|---------|--------------| | **ponytail** | `/ponytail` | Lazy mode itself. Simplest solution that works. | | **ponytail-review** | `/ponytail-review` | Over-engineering review: `L42: yagni: factory, one product. Inline.` | +| **ponytail-gain** | `/ponytail-gain` | Measured-impact scoreboard: less code, less cost, more speed. | | **ponytail-help** | `/ponytail-help` | This card. | Codex uses `@ponytail`, `@ponytail-review`, and `@ponytail-help`; Claude Code diff --git a/.opencode/command/ponytail-gain.md b/.opencode/command/ponytail-gain.md new file mode 100644 index 0000000..9243a0e --- /dev/null +++ b/.opencode/command/ponytail-gain.md @@ -0,0 +1,5 @@ +--- +description: Show ponytail's measured impact scoreboard (less code, cost, time) +--- + +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. diff --git a/README.md b/README.md index 790a1c3..7aad189 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ Reads `AGENTS.md` from the project root — zero setup. Copy [`AGENTS.md`](AGENT clawhub install ponytail ``` -Installs ponytail as an OpenClaw skill from ClawHub; the review, audit, debt, and help skills install the same way (`clawhub install ponytail-review`, and so on). OpenClaw applies it on coding tasks and also exposes it as a `/ponytail` command. Without ClawHub, copy [`.openclaw/skills/ponytail`](.openclaw/skills/) into `~/.openclaw/skills/`. +Installs ponytail as an OpenClaw skill from ClawHub; the review, audit, debt, gain, and help skills install the same way (`clawhub install ponytail-review`, and so on). OpenClaw applies it on coding tasks and also exposes it as a `/ponytail` command. Without ClawHub, copy [`.openclaw/skills/ponytail`](.openclaw/skills/) into `~/.openclaw/skills/`. That was it. He'd be proud. He won't say it. @@ -210,6 +210,7 @@ Which files map to which agent: [Agent portability](docs/agent-portability.md). | `/ponytail-review` | Review the current diff for over-engineering, hands back a delete-list. | | `/ponytail-audit` | Audit the whole repo for over-engineering, not just the diff. | | `/ponytail-debt` | Harvest the `ponytail:` shortcuts you've deferred into a ledger, so "later" doesn't become "never". | +| `/ponytail-gain` | Show the measured impact scoreboard (less code, less cost, more speed) from the benchmark. | | `/ponytail-help` | Quick reference for the commands above. | Commands need a skill-capable host (Claude Code, Codex, OpenCode, Gemini, pi). In Codex they're skills, invoke with `@` (`@ponytail-review`). The instruction-only adapters (Cursor, Windsurf, Cline, Copilot, Kiro, Antigravity) load the always-on ruleset without the commands. diff --git a/commands/ponytail-gain.toml b/commands/ponytail-gain.toml new file mode 100644 index 0000000..17b36f3 --- /dev/null +++ b/commands/ponytail-gain.toml @@ -0,0 +1,2 @@ +description = "Show ponytail's measured impact scoreboard (less code, cost, time)" +prompt = "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." diff --git a/commands/ponytail-help.toml b/commands/ponytail-help.toml index 20399a6..ebb589f 100644 --- a/commands/ponytail-help.toml +++ b/commands/ponytail-help.toml @@ -1,2 +1,2 @@ description = "Quick reference for ponytail levels, skills, and commands" -prompt = "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." +prompt = "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-gain (measured-impact scoreboard from the benchmark), /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." diff --git a/docs/agent-portability.md b/docs/agent-portability.md index f3048b2..5f965f5 100644 --- a/docs/agent-portability.md +++ b/docs/agent-portability.md @@ -36,5 +36,6 @@ instructions, keep its copied rule text aligned with `AGENTS.md`. - `skills/ponytail-review/SKILL.md`: over-engineering review - `skills/ponytail-audit/SKILL.md`: whole-repo over-engineering audit - `skills/ponytail-debt/SKILL.md`: harvest `ponytail:` shortcuts into a tracked ledger +- `skills/ponytail-gain/SKILL.md`: measured-impact scoreboard from the benchmark - `skills/ponytail-help/SKILL.md`: quick reference - `AGENTS.md`: compact always-on instruction set for agents without skill support diff --git a/pi-extension/index.js b/pi-extension/index.js index b8a35e8..fd51703 100644 --- a/pi-extension/index.js +++ b/pi-extension/index.js @@ -120,6 +120,11 @@ export default function ponytailExtension(pi) { handler: (_args, ctx) => sendAlias("/skill:ponytail-audit", "", ctx), }); + pi.registerCommand("ponytail-gain", { + description: "Run /skill:ponytail-gain", + handler: (_args, ctx) => sendAlias("/skill:ponytail-gain", "", ctx), + }); + pi.registerCommand("ponytail-debt", { description: "Run /skill:ponytail-debt", handler: (_args, ctx) => sendAlias("/skill:ponytail-debt", "", ctx), diff --git a/pi-extension/test/extension.test.js b/pi-extension/test/extension.test.js index 1e3817c..969b467 100644 --- a/pi-extension/test/extension.test.js +++ b/pi-extension/test/extension.test.js @@ -57,7 +57,7 @@ function withTempConfig(fn) { test("extension registers Ponytail commands", () => { const { commands } = createPiHarness(); - assert.deepEqual([...commands.keys()].sort(), ["ponytail", "ponytail-audit", "ponytail-debt", "ponytail-help", "ponytail-review"]); + assert.deepEqual([...commands.keys()].sort(), ["ponytail", "ponytail-audit", "ponytail-debt", "ponytail-gain", "ponytail-help", "ponytail-review"]); }); test("/ponytail updates session mode and injects instructions", async () => withTempConfig(async () => { @@ -100,12 +100,14 @@ test("skill alias commands delegate to Pi skill commands", async () => { await commands.get("ponytail-review").handler("", ctx); await commands.get("ponytail-audit").handler("", ctx); await commands.get("ponytail-debt").handler("", ctx); + await commands.get("ponytail-gain").handler("", ctx); await commands.get("ponytail-help").handler("", ctx); assert.deepEqual(sentUserMessages.map((entry) => entry.text), [ "/skill:ponytail-review", "/skill:ponytail-audit", "/skill:ponytail-debt", + "/skill:ponytail-gain", "/skill:ponytail-help", ]); }); diff --git a/scripts/build-openclaw-skills.js b/scripts/build-openclaw-skills.js index bd4f504..9fe215c 100644 --- a/scripts/build-openclaw-skills.js +++ b/scripts/build-openclaw-skills.js @@ -21,6 +21,7 @@ const DESCRIPTIONS = { 'ponytail-review': 'Review a diff for over-engineering. Finds what to delete: reinvented stdlib, needless deps, speculative abstractions. One line per finding.', 'ponytail-audit': 'Audit the whole repo for over-engineering. A ranked list of what to delete, simplify, or replace with stdlib or native features.', 'ponytail-debt': 'Harvest every ponytail: shortcut comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.', + 'ponytail-gain': 'Show ponytail measured impact as a scoreboard: less code, less cost, more speed, from the benchmark medians. One-shot display.', 'ponytail-help': "Quick reference for ponytail's modes, skills, and commands. One-shot display.", }; diff --git a/skills/ponytail-gain/SKILL.md b/skills/ponytail-gain/SKILL.md new file mode 100644 index 0000000..012e37b --- /dev/null +++ b/skills/ponytail-gain/SKILL.md @@ -0,0 +1,50 @@ +--- +name: ponytail-gain +description: > + Show ponytail's measured impact as a compact scoreboard: less code, less + cost, more speed, from the benchmark medians. One-shot display, not a + persistent mode, and not a per-repo number. Trigger: /ponytail-gain, + "ponytail gain", "what does ponytail save", "show ponytail impact", + "ponytail scoreboard". +--- + +# Ponytail Gain + +Display this scoreboard when invoked. One-shot: do NOT change mode, write flag +files, or persist anything. + +The figures are the published benchmark medians (5 everyday tasks: email +validator, debounce, CSV sum, countdown timer, rate limiter; three models: +Haiku, Sonnet, Opus). They are measured, not computed from the current repo. +Source: `benchmarks/` and the README. + +## Scoreboard + +Render plain ASCII bars. The bar length shows the measured range; the label +carries the exact figure: + +``` + ponytail gain benchmark median · 5 tasks · 3 models + + Lines of code no-skill ████████████████████ 100% + ponytail ██▌················· 6–20% ▼ 80–94% + Cost no-skill ████████████████████ 100% + ponytail █████▌·············· 23–53% ▼ 47–77% + Speed ponytail ▸ 3–6× faster + + This repo: /ponytail-debt (shortcuts you deferred) + /ponytail-audit (what's still cuttable) +``` + +## Honesty boundary + +These are benchmark medians, not this repo. NEVER print a per-repo savings +number ("you saved X lines/tokens here"): the unbuilt version was never +written, so there is no real baseline to subtract from in a live repo. The +only real per-repo figures come from `/ponytail-debt` (a counted ledger), and +this card points there instead of inventing one. + +## Boundaries + +One-shot display. Edits nothing, changes no mode. +"stop ponytail" or "normal mode": revert. diff --git a/skills/ponytail-help/SKILL.md b/skills/ponytail-help/SKILL.md index b66a3b3..7e096bf 100644 --- a/skills/ponytail-help/SKILL.md +++ b/skills/ponytail-help/SKILL.md @@ -27,6 +27,7 @@ Level sticks until changed or session end. |-------|---------|--------------| | **ponytail** | `/ponytail` | Lazy mode itself. Simplest solution that works. | | **ponytail-review** | `/ponytail-review` | Over-engineering review: `L42: yagni: factory, one product. Inline.` | +| **ponytail-gain** | `/ponytail-gain` | Measured-impact scoreboard: less code, less cost, more speed. | | **ponytail-help** | `/ponytail-help` | This card. | Codex uses `@ponytail`, `@ponytail-review`, and `@ponytail-help`; Claude Code