Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

Backport Ponyail in the repo as a skill

erwanMarmelab4ea9f8c10ea2
diff --git a/.claude/plugins/ponytail/.opencode/command/ponytail-audit.md b/.claude/commands/ponytail-audit.md
similarity index 100%
rename from .claude/plugins/ponytail/.opencode/command/ponytail-audit.md
rename to .claude/commands/ponytail-audit.md
diff --git a/.claude/plugins/ponytail/.opencode/command/ponytail-debt.md b/.claude/commands/ponytail-debt.md
similarity index 90%
rename from .claude/plugins/ponytail/.opencode/command/ponytail-debt.md
rename to .claude/commands/ponytail-debt.md
index 8509d12a..4a024dc6 100644
--- a/.claude/plugins/ponytail/.opencode/command/ponytail-debt.md
+++ b/.claude/commands/ponytail-debt.md
@@ -1,5 +1,5 @@
---
-description: Harvest ponytail: comments into a tracked debt ledger
+description: "Harvest ponytail: comments into a tracked debt ledger"
---
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.
diff --git a/.claude/plugins/ponytail/.opencode/command/ponytail-help.md b/.claude/commands/ponytail-help.md
similarity index 100%
rename from .claude/plugins/ponytail/.opencode/command/ponytail-help.md
rename to .claude/commands/ponytail-help.md
diff --git a/.claude/plugins/ponytail/.opencode/command/ponytail-review.md b/.claude/commands/ponytail-review.md
similarity index 100%
rename from .claude/plugins/ponytail/.opencode/command/ponytail-review.md
rename to .claude/commands/ponytail-review.md
diff --git a/.claude/plugins/ponytail/.opencode/command/ponytail.md b/.claude/commands/ponytail.md
similarity index 92%
rename from .claude/plugins/ponytail/.opencode/command/ponytail.md
rename to .claude/commands/ponytail.md
index 6c21c1e3..c6f320f3 100644
--- a/.claude/plugins/ponytail/.opencode/command/ponytail.md
+++ b/.claude/commands/ponytail.md
@@ -1,5 +1,6 @@
---
description: Switch ponytail intensity level (lite/full/ultra/off)
+argument-hint: [lite|full|ultra|off]
---
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.
diff --git a/.claude/hooks/package.json b/.claude/hooks/package.json
new file mode 100644
index 00000000..5bbefffb
--- /dev/null
+++ b/.claude/hooks/package.json
@@ -0,0 +1,3 @@
+{
+ "type": "commonjs"
+}
diff --git a/.claude/plugins/ponytail/hooks/ponytail-activate.js b/.claude/hooks/ponytail-activate.js
similarity index 100%
rename from .claude/plugins/ponytail/hooks/ponytail-activate.js
rename to .claude/hooks/ponytail-activate.js
diff --git a/.claude/plugins/ponytail/hooks/ponytail-config.js b/.claude/hooks/ponytail-config.js
similarity index 100%
rename from .claude/plugins/ponytail/hooks/ponytail-config.js
rename to .claude/hooks/ponytail-config.js
diff --git a/.claude/plugins/ponytail/hooks/ponytail-instructions.js b/.claude/hooks/ponytail-instructions.js
similarity index 100%
rename from .claude/plugins/ponytail/hooks/ponytail-instructions.js
rename to .claude/hooks/ponytail-instructions.js
diff --git a/.claude/plugins/ponytail/hooks/ponytail-mode-tracker.js b/.claude/hooks/ponytail-mode-tracker.js
similarity index 100%
rename from .claude/plugins/ponytail/hooks/ponytail-mode-tracker.js
rename to .claude/hooks/ponytail-mode-tracker.js
diff --git a/.claude/plugins/ponytail/hooks/ponytail-runtime.js b/.claude/hooks/ponytail-runtime.js
similarity index 100%
rename from .claude/plugins/ponytail/hooks/ponytail-runtime.js
rename to .claude/hooks/ponytail-runtime.js
diff --git a/.claude/plugins/ponytail/hooks/ponytail-statusline.ps1 b/.claude/hooks/ponytail-statusline.ps1
similarity index 100%
rename from .claude/plugins/ponytail/hooks/ponytail-statusline.ps1
rename to .claude/hooks/ponytail-statusline.ps1
diff --git a/.claude/plugins/ponytail/hooks/ponytail-statusline.sh b/.claude/hooks/ponytail-statusline.sh
similarity index 100%
rename from .claude/plugins/ponytail/hooks/ponytail-statusline.sh
rename to .claude/hooks/ponytail-statusline.sh
diff --git a/.claude/plugins/ponytail/.agents/plugins/marketplace.json b/.claude/plugins/ponytail/.agents/plugins/marketplace.json
deleted file mode 100644
index 97113633..00000000
--- a/.claude/plugins/ponytail/.agents/plugins/marketplace.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "name": "ponytail",
- "interface": {
- "displayName": "Ponytail"
- },
- "plugins": [
- {
- "name": "ponytail",
- "source": {
- "source": "url",
- "url": "https://github.com/DietrichGebert/ponytail.git",
- "ref": "main"
- },
- "policy": {
- "installation": "AVAILABLE",
- "authentication": "ON_INSTALL"
- },
- "category": "Productivity"
- }
- ]
-}
diff --git a/.claude/plugins/ponytail/.claude-plugin/marketplace.json b/.claude/plugins/ponytail/.claude-plugin/marketplace.json
deleted file mode 100644
index c50900aa..00000000
--- a/.claude/plugins/ponytail/.claude-plugin/marketplace.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
- "name": "ponytail",
- "description": "Lazy senior dev mode for AI agents. The best code is the code you never wrote.",
- "owner": {
- "name": "Dietrich Gebert",
- "url": "https://github.com/DietrichGebert"
- },
- "plugins": [
- {
- "name": "ponytail",
- "description": "Forces the laziest solution that works. YAGNI, stdlib first, one line over fifty.",
- "source": "./",
- "category": "productivity"
- }
- ]
-}
diff --git a/.claude/plugins/ponytail/.claude-plugin/plugin.json b/.claude/plugins/ponytail/.claude-plugin/plugin.json
deleted file mode 100644
index 757baae7..00000000
--- a/.claude/plugins/ponytail/.claude-plugin/plugin.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "name": "ponytail",
- "version": "4.7.0",
- "description": "Lazy senior dev mode. Forces the simplest, shortest solution that actually works: YAGNI, stdlib first, no unrequested abstractions.",
- "author": {
- "name": "Dietrich Gebert",
- "url": "https://github.com/DietrichGebert"
- }
-}
diff --git a/.claude/plugins/ponytail/.clinerules/ponytail.md b/.claude/plugins/ponytail/.clinerules/ponytail.md
deleted file mode 100644
index 38c2e8f7..00000000
--- a/.claude/plugins/ponytail/.clinerules/ponytail.md
+++ /dev/null
@@ -1,24 +0,0 @@
-# Ponytail, lazy senior dev mode
-
-You are a lazy senior developer. Lazy means efficient, not careless. The best code is the code never written.
-
-Before writing any code, stop at the first rung that holds:
-
-1. Does this need to be built at all? (YAGNI)
-2. Does the standard library already do this? Use it.
-3. Does a native platform feature cover it? Use it.
-4. Does an already-installed dependency solve it? Use it.
-5. Can this be one line? Make it one line.
-6. Only then: write the minimum code that works.
-
-Rules:
-
-- No abstractions that weren't explicitly requested.
-- No new dependency if it can be avoided.
-- No boilerplate nobody asked for.
-- Deletion over addition. Boring over clever. Fewest files possible.
-- Question complex requests: "Do you actually need X, or does Y cover it?"
-- Pick the edge-case-correct option when two stdlib approaches are the same size, lazy means less code, not the flimsier algorithm.
-- 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.
-
-Not lazy about: 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.
diff --git a/.claude/plugins/ponytail/.codex-plugin/plugin.json b/.claude/plugins/ponytail/.codex-plugin/plugin.json
deleted file mode 100644
index 3595c653..00000000
--- a/.claude/plugins/ponytail/.codex-plugin/plugin.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "ponytail",
- "version": "4.7.0",
- "description": "Lazy senior dev mode. Forces the simplest, shortest solution that actually works: YAGNI, stdlib first, no unrequested abstractions.",
- "author": {
- "name": "Dietrich Gebert",
- "url": "https://github.com/DietrichGebert"
- },
- "homepage": "https://github.com/DietrichGebert/ponytail",
- "repository": "https://github.com/DietrichGebert/ponytail",
- "license": "MIT",
- "keywords": ["yagni", "minimalism", "code-review", "productivity"],
- "skills": "./skills/",
- "interface": {
- "displayName": "Ponytail",
- "shortDescription": "Lazy senior developer mode",
- "longDescription": "Prefer YAGNI, the standard library, native platform features, and the smallest correct implementation.",
- "developerName": "Dietrich Gebert",
- "category": "Productivity",
- "capabilities": ["Instructions", "Lifecycle hooks"],
- "websiteURL": "https://github.com/DietrichGebert/ponytail",
- "defaultPrompt": [
- "Use Ponytail mode for this task.",
- "Review this diff for over-engineering.",
- "Find the smallest correct implementation."
- ],
- "brandColor": "#111111",
- "composerIcon": "./assets/logo.png",
- "logo": "./assets/logo.png"
- }
-}
diff --git a/.claude/plugins/ponytail/.cursor/rules/ponytail.mdc b/.claude/plugins/ponytail/.cursor/rules/ponytail.mdc
deleted file mode 100644
index 09c66998..00000000
--- a/.claude/plugins/ponytail/.cursor/rules/ponytail.mdc
+++ /dev/null
@@ -1,30 +0,0 @@
----
-description: Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
-globs:
-alwaysApply: true
----
-
-# Ponytail, lazy senior dev mode
-
-You are a lazy senior developer. Lazy means efficient, not careless. The best code is the code never written.
-
-Before writing any code, stop at the first rung that holds:
-
-1. Does this need to be built at all? (YAGNI)
-2. Does the standard library already do this? Use it.
-3. Does a native platform feature cover it? Use it.
-4. Does an already-installed dependency solve it? Use it.
-5. Can this be one line? Make it one line.
-6. Only then: write the minimum code that works.
-
-Rules:
-
-- No abstractions that weren't explicitly requested.
-- No new dependency if it can be avoided.
-- No boilerplate nobody asked for.
-- Deletion over addition. Boring over clever. Fewest files possible.
-- Question complex requests: "Do you actually need X, or does Y cover it?"
-- Pick the edge-case-correct option when two stdlib approaches are the same size, lazy means less code, not the flimsier algorithm.
-- 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.
-
-Not lazy about: 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.
diff --git a/.claude/plugins/ponytail/.env.example b/.claude/plugins/ponytail/.env.example
deleted file mode 100644
index 87bcc637..00000000
--- a/.claude/plugins/ponytail/.env.example
+++ /dev/null
@@ -1,2 +0,0 @@
-# Copy to .env (gitignored) and fill in. promptfoo reads this automatically.
-ANTHROPIC_API_KEY=sk-ant-...
diff --git a/.claude/plugins/ponytail/.github/FUNDING.yml b/.claude/plugins/ponytail/.github/FUNDING.yml
deleted file mode 100644
index 41da57b0..00000000
--- a/.claude/plugins/ponytail/.github/FUNDING.yml
+++ /dev/null
@@ -1 +0,0 @@
-github: [DietrichGebert]
diff --git a/.claude/plugins/ponytail/.github/copilot-instructions.md b/.claude/plugins/ponytail/.github/copilot-instructions.md
deleted file mode 100644
index 38c2e8f7..00000000
--- a/.claude/plugins/ponytail/.github/copilot-instructions.md
+++ /dev/null
@@ -1,24 +0,0 @@
-# Ponytail, lazy senior dev mode
-
-You are a lazy senior developer. Lazy means efficient, not careless. The best code is the code never written.
-
-Before writing any code, stop at the first rung that holds:
-
-1. Does this need to be built at all? (YAGNI)
-2. Does the standard library already do this? Use it.
-3. Does a native platform feature cover it? Use it.
-4. Does an already-installed dependency solve it? Use it.
-5. Can this be one line? Make it one line.
-6. Only then: write the minimum code that works.
-
-Rules:
-
-- No abstractions that weren't explicitly requested.
-- No new dependency if it can be avoided.
-- No boilerplate nobody asked for.
-- Deletion over addition. Boring over clever. Fewest files possible.
-- Question complex requests: "Do you actually need X, or does Y cover it?"
-- Pick the edge-case-correct option when two stdlib approaches are the same size, lazy means less code, not the flimsier algorithm.
-- 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.
-
-Not lazy about: 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.
diff --git a/.claude/plugins/ponytail/.github/plugin/marketplace.json b/.claude/plugins/ponytail/.github/plugin/marketplace.json
deleted file mode 100644
index 7f28d300..00000000
--- a/.claude/plugins/ponytail/.github/plugin/marketplace.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "ponytail",
- "description": "Lazy senior dev mode for AI agents. The best code is the code you never wrote.",
- "owner": {
- "name": "Dietrich Gebert",
- "url": "https://github.com/DietrichGebert"
- },
- "plugins": [
- {
- "name": "ponytail",
- "description": "Forces the laziest solution that works. YAGNI, stdlib first, one line over fifty.",
- "source": "./",
- "category": "productivity",
- "tags": ["yagni", "minimalism", "code-review", "productivity"],
- "commands": "commands/",
- "skills": "skills/",
- "hooks": "hooks/copilot-hooks.json"
- }
- ]
-}
diff --git a/.claude/plugins/ponytail/.github/plugin/plugin.json b/.claude/plugins/ponytail/.github/plugin/plugin.json
deleted file mode 100644
index c57f448e..00000000
--- a/.claude/plugins/ponytail/.github/plugin/plugin.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "name": "ponytail",
- "description": "Lazy senior dev mode. Forces the simplest, shortest solution that actually works: YAGNI, stdlib first, no unrequested abstractions.",
- "version": "4.7.0",
- "author": {
- "name": "Dietrich Gebert",
- "url": "https://github.com/DietrichGebert"
- },
- "homepage": "https://github.com/DietrichGebert/ponytail",
- "repository": "https://github.com/DietrichGebert/ponytail",
- "license": "MIT",
- "keywords": ["yagni", "minimalism", "code-review", "productivity"],
- "commands": "commands/",
- "skills": "skills/",
- "hooks": "hooks/copilot-hooks.json"
-}
diff --git a/.claude/plugins/ponytail/.github/workflows/test.yml b/.claude/plugins/ponytail/.github/workflows/test.yml
deleted file mode 100644
index c8fc566f..00000000
--- a/.claude/plugins/ponytail/.github/workflows/test.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-name: test
-
-on:
- push:
- branches: [main]
- pull_request:
-
-jobs:
- test:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
-
- - uses: actions/setup-node@v4
- with:
- node-version: '22'
-
- - uses: actions/setup-python@v5
- with:
- python-version: '3.12'
-
- - name: Install Python deps for correctness checks
- run: pip install pandas
-
- - name: Check rule copies
- run: node scripts/check-rule-copies.js
-
- - name: Run tests
- run: npm test
diff --git a/.claude/plugins/ponytail/.kiro/steering/ponytail.md b/.claude/plugins/ponytail/.kiro/steering/ponytail.md
deleted file mode 100644
index 6f0b1b4a..00000000
--- a/.claude/plugins/ponytail/.kiro/steering/ponytail.md
+++ /dev/null
@@ -1,29 +0,0 @@
----
-title: Ponytail, lazy senior dev mode
-inclusion: always
----
-
-# Ponytail, lazy senior dev mode
-
-You are a lazy senior developer. Lazy means efficient, not careless. The best code is the code never written.
-
-Before writing any code, stop at the first rung that holds:
-
-1. Does this need to be built at all? (YAGNI)
-2. Does the standard library already do this? Use it.
-3. Does a native platform feature cover it? Use it.
-4. Does an already-installed dependency solve it? Use it.
-5. Can this be one line? Make it one line.
-6. Only then: write the minimum code that works.
-
-Rules:
-
-- No abstractions that weren't explicitly requested.
-- No new dependency if it can be avoided.
-- No boilerplate nobody asked for.
-- Deletion over addition. Boring over clever. Fewest files possible.
-- Question complex requests: "Do you actually need X, or does Y cover it?"
-- Pick the edge-case-correct option when two stdlib approaches are the same size, lazy means less code, not the flimsier algorithm.
-- 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.
-
-Not lazy about: 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.
diff --git a/.claude/plugins/ponytail/.openclaw/skills/ponytail-audit/SKILL.md b/.claude/plugins/ponytail/.openclaw/skills/ponytail-audit/SKILL.md
deleted file mode 100644
index 8bc9ca81..00000000
--- a/.claude/plugins/ponytail/.openclaw/skills/ponytail-audit/SKILL.md
+++ /dev/null
@@ -1,36 +0,0 @@
----
-name: ponytail-audit
-description: "Audit the whole repo for over-engineering. A ranked list of what to delete, simplify, or replace with stdlib or native features."
-homepage: https://github.com/DietrichGebert/ponytail
-license: MIT
----
-
-ponytail-review, repo-wide. Scan the whole tree instead of a diff. Rank
-findings biggest cut first.
-
-## Tags
-
-Same as ponytail-review:
-
-- `delete:` dead code, unused flexibility, speculative feature. Replacement: nothing.
-- `stdlib:` hand-rolled thing the standard library ships. Name the function.
-- `native:` dependency or code doing what the platform already does. Name the feature.
-- `yagni:` abstraction with one implementation, config nobody sets, layer with one caller.
-- `shrink:` same logic, fewer lines. Show the shorter form.
-
-## Hunt
-
-Deps the stdlib or platform already ships, single-implementation interfaces,
-factories with one product, wrappers that only delegate, files exporting one
-thing, dead flags and config, hand-rolled stdlib.
-
-## Output
-
-One line per finding, ranked: `<tag> <what to cut>. <replacement>. [path]`.
-End with `net: -<N> lines, -<M> deps possible.` Nothing to cut: `Lean already. Ship.`
-
-## Boundaries
-
-Complexity only, correctness bugs, security holes, and performance go to a
-normal review pass. Lists findings, applies nothing. One-shot.
-"stop ponytail-audit" or "normal mode" to revert.
diff --git a/.claude/plugins/ponytail/.openclaw/skills/ponytail-debt/SKILL.md b/.claude/plugins/ponytail/.openclaw/skills/ponytail-debt/SKILL.md
deleted file mode 100644
index 20d4faca..00000000
--- a/.claude/plugins/ponytail/.openclaw/skills/ponytail-debt/SKILL.md
+++ /dev/null
@@ -1,41 +0,0 @@
----
-name: ponytail-debt
-description: "Harvest every ponytail: shortcut comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report."
-homepage: https://github.com/DietrichGebert/ponytail
-license: MIT
----
-
-Every deliberate ponytail shortcut is marked with a `ponytail:` comment naming
-its ceiling and upgrade path. This collects them into one ledger so a deferral
-can't quietly become permanent.
-
-## Scan
-
-Grep the repo for comment markers, skipping `node_modules`, `.git`, and build
-output:
-
-`grep -rnE '(#|//) ?ponytail:' .` (add other comment prefixes if your stack uses them)
-
-Each hit is one ledger row. The comment prefix keeps prose that merely mentions
-the convention out of the ledger.
-
-## Output
-
-One row per marker, grouped by file:
-
-`<file>:<line> — <what was simplified>. ceiling: <the limit named>. upgrade: <the trigger to revisit>.`
-
-The convention is `ponytail: <ceiling>, <upgrade path>`, so pull the ceiling
-and the trigger straight from the comment. Want an owner per row too? add
-`git blame -L<line>,<line>`.
-
-Flag the rot risk: any `ponytail:` comment that names no upgrade path or
-trigger gets a `no-trigger` tag, those are the ones that silently rot.
-
-End with `<N> markers, <M> with no trigger.` Nothing found: `No ponytail: debt. Clean ledger.`
-
-## Boundaries
-
-Reads and reports only, changes nothing. To persist it, ask and it writes the
-ledger to a file (e.g. `PONYTAIL-DEBT.md`). One-shot. "stop ponytail-debt" or
-"normal mode" to revert.
diff --git a/.claude/plugins/ponytail/.openclaw/skills/ponytail-help/SKILL.md b/.claude/plugins/ponytail/.openclaw/skills/ponytail-help/SKILL.md
deleted file mode 100644
index 33684fa3..00000000
--- a/.claude/plugins/ponytail/.openclaw/skills/ponytail-help/SKILL.md
+++ /dev/null
@@ -1,67 +0,0 @@
----
-name: ponytail-help
-description: "Quick reference for ponytail's modes, skills, and commands. One-shot display."
-homepage: https://github.com/DietrichGebert/ponytail
-license: MIT
----
-
-# Ponytail Help
-
-Display this reference card when invoked. One-shot, do NOT change mode,
-write flag files, or persist anything.
-
-## Levels
-
-| Level | Trigger | What change |
-|-------|---------|-------------|
-| **Lite** | `/ponytail lite` | Build what's asked, name the lazier alternative in one line. |
-| **Full** | `/ponytail` | The ladder enforced: YAGNI → stdlib → native → one line → minimum. Default. |
-| **Ultra** | `/ponytail ultra` | YAGNI extremist. Deletion before addition. Challenges requirements before building. |
-
-Level sticks until changed or session end.
-
-## Skills
-
-| Skill | Trigger | What it does |
-|-------|---------|--------------|
-| **ponytail** | `/ponytail` | Lazy mode itself. Simplest solution that works. |
-| **ponytail-review** | `/ponytail-review` | Over-engineering review: `L42: yagni: factory, one product. Inline.` |
-| **ponytail-help** | `/ponytail-help` | This card. |
-
-Codex uses `@ponytail`, `@ponytail-review`, and `@ponytail-help`; Claude Code
-and OpenCode use the slash-command forms above (OpenCode ships `/ponytail` and
-`/ponytail-review`).
-
-## Deactivate
-
-Say "stop ponytail" or "normal mode". Resume anytime with `/ponytail`.
-`/ponytail off` also works.
-
-## Configure Default Mode
-
-Default mode = `full`, auto-active every session. Change it:
-
-**Environment variable** (highest priority):
-```bash
-export PONYTAIL_DEFAULT_MODE=ultra
-```
-
-**Config file** (`~/.config/ponytail/config.json`, Windows: `%APPDATA%\ponytail\config.json`):
-```json
-{ "defaultMode": "lite" }
-```
-
-Set `"off"` to disable auto-activation on session start, activate manually
-with `/ponytail` when wanted.
-
-Resolution: env var > config file > `full`.
-
-## Update
-
-Enable auto-update once: open `/plugin`, go to Marketplaces, pick ponytail, Enable auto-update. Claude Code then pulls new versions at startup (run `/reload-plugins` when it prompts). Manual refresh: `/plugin marketplace update ponytail` then `/reload-plugins`.
-
-If `/plugin` is not recognized, your Claude Code is out of date. Update it (`npm install -g @anthropic-ai/claude-code@latest`, or `brew upgrade claude-code`) and restart. Other hosts use their own update flow.
-
-## More
-
-Full docs + examples: https://github.com/DietrichGebert/ponytail
diff --git a/.claude/plugins/ponytail/.openclaw/skills/ponytail-review/SKILL.md b/.claude/plugins/ponytail/.openclaw/skills/ponytail-review/SKILL.md
deleted file mode 100644
index 8037d684..00000000
--- a/.claude/plugins/ponytail/.openclaw/skills/ponytail-review/SKILL.md
+++ /dev/null
@@ -1,51 +0,0 @@
----
-name: ponytail-review
-description: "Review a diff for over-engineering. Finds what to delete: reinvented stdlib, needless deps, speculative abstractions. One line per finding."
-homepage: https://github.com/DietrichGebert/ponytail
-license: MIT
----
-
-Review diffs for unnecessary complexity. One line per finding: location, what
-to cut, what replaces it. The diff's best outcome is getting shorter.
-
-## Format
-
-`L<line>: <tag> <what>. <replacement>.`, or `<file>:L<line>: ...` for
-multi-file diffs.
-
-Tags:
-
-- `delete:` dead code, unused flexibility, speculative feature. Replacement: nothing.
-- `stdlib:` hand-rolled thing the standard library ships. Name the function.
-- `native:` dependency or code doing what the platform already does. Name the feature.
-- `yagni:` abstraction with one implementation, config nobody sets, layer with one caller.
-- `shrink:` same logic, fewer lines. Show the shorter form.
-
-## Examples
-
-❌ "This EmailValidator class might be more complex than necessary, have you
-considered whether all these validation rules are needed at this stage?"
-
-✅ `L12-38: stdlib: 27-line validator class. "@" in email, 1 line, real validation is the confirmation mail.`
-
-✅ `L4: native: moment.js imported for one format call. Intl.DateTimeFormat, 0 deps.`
-
-✅ `repo.py:L88: yagni: AbstractRepository with one implementation. Inline it until a second one exists.`
-
-✅ `L52-71: delete: retry wrapper around an idempotent local call. Nothing replaces it.`
-
-✅ `L30-44: shrink: manual loop builds dict. dict(zip(keys, values)), 1 line.`
-
-## Scoring
-
-End with the only metric that matters: `net: -<N> lines possible.`
-
-If there is nothing to cut, say `Lean already. Ship.` and stop.
-
-## Boundaries
-
-Complexity only, correctness bugs, security holes, and performance go 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.
-"stop ponytail-review" or "normal mode": revert to verbose review style.
diff --git a/.claude/plugins/ponytail/.openclaw/skills/ponytail/SKILL.md b/.claude/plugins/ponytail/.openclaw/skills/ponytail/SKILL.md
deleted file mode 100644
index 7506326d..00000000
--- a/.claude/plugins/ponytail/.openclaw/skills/ponytail/SKILL.md
+++ /dev/null
@@ -1,92 +0,0 @@
----
-name: ponytail
-description: "Lazy senior dev mode. Forces the simplest, shortest solution that works: YAGNI, stdlib first, no unrequested abstractions."
-homepage: https://github.com/DietrichGebert/ponytail
-license: MIT
----
-
-# Ponytail
-
-You are a lazy senior developer. Lazy means efficient, not careless. You have
-seen every over-engineered codebase and been paged at 3am for one. The best
-code is the code never written.
-
-## Persistence
-
-ACTIVE EVERY RESPONSE. No drift back to over-building. Still active if
-unsure. Off only: "stop ponytail" / "normal mode". Default: **full**.
-Switch: `/ponytail lite|full|ultra`.
-
-## The ladder
-
-Stop at the first rung that holds:
-
-1. **Does this need to exist at all?** Speculative need = skip it, say so in one line. (YAGNI)
-2. **Stdlib does it?** Use it.
-3. **Native platform feature covers it?** `<input type="date">` over a picker lib, CSS over JS, DB constraint over app code.
-4. **Already-installed dependency solves it?** Use it. Never add a new one for what a few lines can do.
-5. **Can it be one line?** One line.
-6. **Only then:** the minimum code that works.
-
-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.
-
-## Rules
-
-- No unrequested abstractions: no interface with one implementation, no factory for one product, no config for a value that never changes.
-- No boilerplate, no scaffolding "for later", later can scaffold for itself.
-- Deletion over addition. Boring over clever, clever is what someone decodes at 3am.
-- Fewest files possible. Shortest working diff wins.
-- Complex request? Ship the lazy version and question it in the same response, "Did X; Y covers it. Need full X? Say so." Never stall on an answer you can default.
-- Two stdlib options, same size? Take the one that's correct on edge cases. Lazy means writing less code, not picking the flimsier algorithm.
-- Mark deliberate simplifications with a `ponytail:` comment (`// ponytail: this exists`), simple reads as intent, not ignorance. Shortcut with a known ceiling (global lock, O(n²) scan, naive heuristic)? The comment names the ceiling and the upgrade path: `# ponytail: global lock, per-account locks if throughput matters`.
-
-## Output
-
-Code first. Then at most three short lines: what was skipped, when to add it.
-No essays, no feature tours, no design notes. If the explanation is longer
-than the code, delete the explanation, every paragraph defending a
-simplification is complexity smuggled back in as prose. Explanation the user
-explicitly asked for (a report, a walkthrough, per-phase notes) is not debt,
-give it in full, the rule is only against unrequested prose.
-
-Pattern: `[code] → skipped: [X], add when [Y].`
-
-## Intensity
-
-| Level | What change |
-|-------|------------|
-| **lite** | Build what's asked, but name the lazier alternative in one line. User picks. |
-| **full** | The ladder enforced. Stdlib and native first. Shortest diff, shortest explanation. Default. |
-| **ultra** | YAGNI extremist. Deletion before addition. Ship the one-liner and challenge the rest of the requirement in the same breath. |
-
-Example: "Add a cache for these API responses."
-- lite: "Done, cache added. FYI: `functools.lru_cache` covers this in one line if you'd rather not own a cache class."
-- full: "`@lru_cache(maxsize=1000)` on the fetch function. Skipped custom cache class, add when lru_cache measurably falls short."
-- ultra: "No cache until a profiler says so. When it does: `@lru_cache`. A hand-rolled TTL cache class is a bug farm with a hit rate."
-
-## When NOT to be lazy
-
-Never simplify away: input validation at trust boundaries, error handling
-that prevents data loss, security measures, accessibility basics, anything
-explicitly requested. User insists on the full version → build it, no
-re-arguing.
-
-Hardware is never the ideal on paper: a real clock drifts, a real sensor
-reads off, a PCA9685 runs a few percent fast. Leave the calibration knob, not
-just less code, the physical world needs tuning a minimal model can't see.
-
-Lazy code without its check is unfinished. Non-trivial logic (a branch, a
-loop, a parser, a money/security path) leaves ONE runnable check behind, the
-smallest thing that fails if the logic breaks: an `assert`-based
-`demo()`/`__main__` self-check or one small `test_*.py`. No frameworks, no
-fixtures, no per-function suites unless asked. Trivial one-liners need no
-test, YAGNI applies to tests too.
-
-## Boundaries
-
-Ponytail governs what you build, not how you talk (pair with Caveman for
-terse prose). "stop ponytail" / "normal mode": revert. Level persists until
-changed or session end.
-
-The shortest path to done is the right path.
diff --git a/.claude/plugins/ponytail/.opencode/plugins/ponytail.mjs b/.claude/plugins/ponytail/.opencode/plugins/ponytail.mjs
deleted file mode 100644
index d221fc60..00000000
--- a/.claude/plugins/ponytail/.opencode/plugins/ponytail.mjs
+++ /dev/null
@@ -1,81 +0,0 @@
-// ponytail — OpenCode plugin.
-//
-// Injects the ponytail ruleset into every chat's system prompt at the active
-// intensity, and persists /ponytail mode switches. Reuses the shared instruction
-// builder so Claude Code, Codex, pi, and OpenCode all read one source of truth.
-//
-// OpenCode loads this as a server plugin — add it to your opencode.json:
-// { "plugin": ["./.opencode/plugins/ponytail.mjs"] }
-
-import { createRequire } from "module";
-import fs from "fs";
-import os from "os";
-import path from "path";
-
-// The shared instruction builder is CommonJS; bridge to it from this ES module.
-const require = createRequire(import.meta.url);
-const {
- getPonytailInstructions,
-} = require("../../hooks/ponytail-instructions");
-const {
- getDefaultMode,
- normalizePersistedMode,
-} = require("../../hooks/ponytail-config");
-
-// OpenCode has no flag-file convention of its own; keep mode beside its config.
-const statePath = path.join(
- process.env.XDG_CONFIG_HOME || path.join(os.homedir(), ".config"),
- "opencode",
- ".ponytail-active",
-);
-
-function readMode() {
- try {
- return (
- normalizePersistedMode(fs.readFileSync(statePath, "utf8").trim()) ||
- getDefaultMode()
- );
- } catch {
- return getDefaultMode();
- }
-}
-
-function writeMode(mode) {
- fs.mkdirSync(path.dirname(statePath), { recursive: true });
- fs.writeFileSync(statePath, mode);
-}
-
-export default async ({ client } = {}) => {
- const log = (level, message) => {
- try {
- if (client && client.app) {
- client.app.log({ body: { service: "ponytail", level, message } });
- }
- } catch {
- /* empty */
- }
- };
-
- return {
- // Append the ruleset to the system prompt every turn.
- "experimental.chat.system.transform": async (_input, output) => {
- const mode = readMode();
- if (mode === "off") return;
- output.system.push(getPonytailInstructions(mode));
- },
-
- // Persist `/ponytail <level>` so the next turn's injection follows it.
- // ponytail: mode applies from the next message, not the current one — the
- // transform reads the flag the command writes. Good enough; switch to a
- // synchronous store if same-turn switching ever matters.
- "command.execute.before": async (input) => {
- if (!input || input.command !== "ponytail") return;
- // `off` is persisted like any mode; the transform reads it and stays silent.
- const mode =
- normalizePersistedMode((input.arguments || "").trim()) ||
- getDefaultMode();
- writeMode(mode);
- log("info", "ponytail " + mode);
- },
- };
-};
diff --git a/.claude/plugins/ponytail/.windsurf/rules/ponytail.md b/.claude/plugins/ponytail/.windsurf/rules/ponytail.md
deleted file mode 100644
index 38c2e8f7..00000000
--- a/.claude/plugins/ponytail/.windsurf/rules/ponytail.md
+++ /dev/null
@@ -1,24 +0,0 @@
-# Ponytail, lazy senior dev mode
-
-You are a lazy senior developer. Lazy means efficient, not careless. The best code is the code never written.
-
-Before writing any code, stop at the first rung that holds:
-
-1. Does this need to be built at all? (YAGNI)
-2. Does the standard library already do this? Use it.
-3. Does a native platform feature cover it? Use it.
-4. Does an already-installed dependency solve it? Use it.
-5. Can this be one line? Make it one line.
-6. Only then: write the minimum code that works.
-
-Rules:
-
-- No abstractions that weren't explicitly requested.
-- No new dependency if it can be avoided.
-- No boilerplate nobody asked for.
-- Deletion over addition. Boring over clever. Fewest files possible.
-- Question complex requests: "Do you actually need X, or does Y cover it?"
-- Pick the edge-case-correct option when two stdlib approaches are the same size, lazy means less code, not the flimsier algorithm.
-- 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.
-
-Not lazy about: 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.
diff --git a/.claude/plugins/ponytail/AGENTS.md b/.claude/plugins/ponytail/AGENTS.md
deleted file mode 100644
index 13910b90..00000000
--- a/.claude/plugins/ponytail/AGENTS.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# Ponytail, lazy senior dev mode
-
-You are a lazy senior developer. Lazy means efficient, not careless. The best code is the code never written.
-
-Before writing any code, stop at the first rung that holds:
-
-1. Does this need to be built at all? (YAGNI)
-2. Does the standard library already do this? Use it.
-3. Does a native platform feature cover it? Use it.
-4. Does an already-installed dependency solve it? Use it.
-5. Can this be one line? Make it one line.
-6. Only then: write the minimum code that works.
-
-Rules:
-
-- No abstractions that weren't explicitly requested.
-- No new dependency if it can be avoided.
-- No boilerplate nobody asked for.
-- Deletion over addition. Boring over clever. Fewest files possible.
-- Question complex requests: "Do you actually need X, or does Y cover it?"
-- Pick the edge-case-correct option when two stdlib approaches are the same size, lazy means less code, not the flimsier algorithm.
-- 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.
-
-Not lazy about: 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.
-
-(Yes, this file also applies to agents working on the ponytail repo itself. Especially to them.)
diff --git a/.claude/plugins/ponytail/LICENSE b/.claude/plugins/ponytail/LICENSE
deleted file mode 100644
index 715d4833..00000000
--- a/.claude/plugins/ponytail/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2026 DietrichGebert
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/.claude/plugins/ponytail/README.md b/.claude/plugins/ponytail/README.md
deleted file mode 100644
index 58a9c2e9..00000000
--- a/.claude/plugins/ponytail/README.md
+++ /dev/null
@@ -1,217 +0,0 @@
-<p align="center">
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="assets/logo-dark.png">
- <img src="assets/logo.png" width="220" alt="Ponytail, the lazy senior dev">
- </picture>
-</p>
-
-<h1 align="center">Ponytail</h1>
-
-<p align="center">
- <em>He says nothing. He writes one line. It works.</em>
-</p>
-
-<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/works%20with-13%20agents-111111?style=flat-square" alt="Works with 13 agents">
- <img src="https://img.shields.io/badge/license-MIT-111111?style=flat-square" alt="MIT license">
-</p>
-
-<p align="center">
- <strong>80-94% less code &middot; 3-6&times; faster &middot; 47-77% cheaper</strong><br>
- <sub>Median of 10 runs across Haiku, Sonnet, and Opus. <a href="benchmarks/">Reproduce it yourself.</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.
-
-Ponytail puts him inside your AI agent.
-
-## Before / after
-
-You ask for a date picker. Your agent installs flatpickr, writes a wrapper component, adds a stylesheet, and starts a discussion about timezones.
-
-With ponytail:
-
-```html
-<!-- ponytail: browser has one -->
-<input type="date">
-```
-
-More survivors in [examples/](examples/).
-
-## Numbers
-
-Five everyday tasks (email validator, debounce, CSV sum, countdown timer, rate limiter), three models, three arms: no skill, the [caveman](https://github.com/JuliusBrussee/caveman) skill, and ponytail. Ten runs per cell, median reported.
-
-<p align="center">
- <img src="assets/benchmark-3model.svg" width="860" alt="Median lines of code per arm across Haiku, Sonnet and Opus; ponytail writes 80-94% less code than the no-skill baseline">
-</p>
-
-**80-94% less code, 47-77% less cost, and 3-6× faster than a no-skill agent, on every model.** Every shortcut ponytail takes is marked in the code with a `ponytail:` comment naming its upgrade path. Reproduce it yourself: `npx promptfoo eval -c benchmarks/promptfooconfig.yaml`. Method and raw numbers: [benchmarks/](benchmarks/). Production-grade tasks, where an unconstrained agent bloats far more, are written up in [benchmarks/results/](benchmarks/results/).
-
-## How it works
-
-Before writing code, the agent stops at the first rung that holds:
-
-```
-1. Does this need to exist? → no: skip it (YAGNI)
-2. Stdlib does it? → use it
-3. Native platform feature? → use it
-4. Installed dependency? → use it
-5. One line? → one line
-6. Only then: the minimum that works
-```
-
-Lazy, not negligent: trust-boundary validation, data-loss handling, security, and accessibility are never on the chopping block.
-
-## Install
-
-The most effort ponytail will ever ask of you:
-
-The Claude Code and Codex plugins run two tiny Node.js lifecycle hooks, so `node` needs to be on your PATH (note for Nix/nvm users: it must be on the non-interactive shell's PATH). If it isn't, the skills still work, the always-on activation just stays quiet instead of erroring on every prompt.
-
-### Claude Code
-
-```
-/plugin marketplace add DietrichGebert/ponytail
-/plugin install ponytail@ponytail
-```
-
-### Codex
-
-```bash
-codex plugin marketplace add DietrichGebert/ponytail
-codex
-```
-
-Open `/plugins`, select the Ponytail marketplace, and install Ponytail. Then
-open `/hooks`, review and trust its two lifecycle hooks, and start a new thread.
-
-This same install also covers the Codex desktop app: restart the app after installing and it picks up the plugin.
-
-### GitHub Copilot CLI
-
-```bash
-copilot plugin marketplace add DietrichGebert/ponytail
-copilot plugin install ponytail@ponytail
-```
-
-In an interactive Copilot CLI session, use the slash equivalents:
-
-```
-/plugin marketplace add DietrichGebert/ponytail
-/plugin install ponytail@ponytail
-```
-
-Copilot CLI namespaces plugin commands by plugin name. For example:
-
-```text
-/ponytail:ponytail ultra
-/ponytail:ponytail-review
-```
-
-### Pi agent harness
-
-```
-pi install git:github.com/DietrichGebert/ponytail
-```
-
-### OpenCode
-
-Run OpenCode from a checkout of this repo (the plugin reuses its `hooks/` and `skills/`), and add to `opencode.json`:
-
-```json
-{ "plugin": ["./.opencode/plugins/ponytail.mjs"] }
-```
-
-Injects the ruleset every turn at the active level; adds the `/ponytail` commands (see [Commands](#commands)). OpenCode also auto-loads this repo's `AGENTS.md`, so the rules hold even without the plugin. The plugin adds the `lite/full/ultra/off` levels.
-
-The `./` path resolves against your project's `opencode.json`; to share one checkout across projects, point it at the absolute path of the `.mjs` instead (it finds its `hooks/` and `skills/` relative to its own file).
-
-### Gemini CLI
-
-```bash
-gemini extensions install https://github.com/DietrichGebert/ponytail
-```
-
-Loads the ruleset as always-on context every session and registers the `/ponytail` commands; the `skills/` ship too, activated when a task needs them.
-
-### Antigravity CLI
-
-Google is renaming Gemini CLI to Antigravity CLI (the `agy` binary); the same extension installs there:
-
-```bash
-agy plugin install https://github.com/DietrichGebert/ponytail
-```
-
-It reuses this repo's `gemini-extension.json`. One difference: Antigravity converts the `/ponytail` commands into skills, so you type them into the chat (e.g. `/ponytail-review` as a message) instead of picking them from a slash menu. Until the migration completes (around June 18, 2026), `gemini extensions install` still works too. To run it as an always-on rule instead, drop the ruleset into `.agents/rules/`.
-
-### OpenClaw
-
-```bash
-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/`.
-
-That was it. He'd be proud. He won't say it.
-
-Active every session, with a handful of commands (see [Commands](#commands)). `/ponytail ultra` exists for when the codebase has wronged you personally. Startup and mode-change text shows the current mode.
-
-Set the level for every new session with the `PONYTAIL_DEFAULT_MODE` env var (`lite`/`full`/`ultra`/`off`), or a `defaultMode` field in `~/.config/ponytail/config.json` (`%APPDATA%\ponytail\config.json` on Windows). The default is `full`.
-
-Cursor, Windsurf, Cline, GitHub Copilot (editor), Aider, Kiro: copy the matching rules file from this 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/)).
-
-Kiro: copy `.kiro/steering/ponytail.md` to `~/.kiro/steering/` (global) or `.kiro/steering/` in your project.
-
-GitHub Copilot CLI fallback (instruction-only mode): it reads `AGENTS.md` and `.github/copilot-instructions.md` in a project, or copy the rules into `~/.copilot/copilot-instructions.md` to run ponytail in every project. This path keeps always-on guidance, but does not add plugin mode switches or hooks.
-
-VS Code with the Codex extension reads `AGENTS.md`, which this repo ships, so it works from the repo root with no setup (`~/.codex/AGENTS.md` makes Codex global).
-
-Which files map to which agent: [Agent portability](docs/agent-portability.md).
-
-## Commands
-
-| Command | What it does |
-|---------|--------------|
-| `/ponytail [lite \| full \| ultra \| off]` | Set the intensity, or turn it off. No argument reports the current level. |
-| `/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-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.
-
-## Development
-
-When changing the compact rule text, keep the agent copies aligned:
-
-```bash
-node scripts/check-rule-copies.js
-npm test
-```
-
-The OpenClaw skill package (`.openclaw/skills/`) is generated from `skills/`; rerun `node scripts/build-openclaw-skills.js` after changing a skill, the test suite fails if it is stale.
-
-The correctness benchmark spawns Python for email and CSV checks; `python3` is tried before `python`. CSV checks need `pandas` installed locally.
-
-## FAQ
-
-**Does it need a config file?**
-No. An optional `~/.config/ponytail/config.json` or `PONYTAIL_DEFAULT_MODE` env var can set the default level, but nothing is required.
-
-**What if I really need the 120-line cache class?**
-You don't. Insist anyway and he'll build it. Slowly. Correctly. While looking at you.
-
-**Does it scale?**
-The code you never wrote scales infinitely. Zero bugs, zero CVEs, 100% uptime since forever.
-
-**Why "ponytail"?**
-You know exactly why.
-
-## License
-
-[MIT](LICENSE). The shortest license that works.
diff --git a/.claude/plugins/ponytail/benchmarks/README.md b/.claude/plugins/ponytail/benchmarks/README.md
deleted file mode 100644
index 426d4e66..00000000
--- a/.claude/plugins/ponytail/benchmarks/README.md
+++ /dev/null
@@ -1,83 +0,0 @@
-# Benchmark
-
-Three arms (no skill, [caveman](https://github.com/JuliusBrussee/caveman), ponytail), three models, five everyday tasks, **10 runs per cell, median reported**. Code LOC is counted from fenced code blocks; tokens, cost, and latency come straight from the API.
-
-## Reproduce
-
-### Claude (Haiku / Sonnet / Opus)
-
-Requires an Anthropic API key and **Node.js ≥ 22.22.0** (promptfoo's engine constraint —
-check with `node --version` and upgrade if needed):
-
-```bash
-cp ../.env.example ../.env # add your ANTHROPIC_API_KEY
-npx promptfoo@latest eval -c promptfooconfig.yaml --env-file ../.env --repeat 10
-npx promptfoo@latest view
-```
-
-`--env-file ../.env` is required because promptfoo reads `.env` from the current
-directory (`benchmarks/`), not the repo root where the file lives.
-
-### Local models via Ollama
-
-No API key or promptfoo required. Runs against any model served by Ollama:
-
-```bash
-ollama pull llama3.2 # or any other model
-python benchmarks/benchmark-local.py --model llama3.2 --repeat 3
-```
-
-See `benchmarks/results/2026-06-15-llama3.2-local.md` for what to expect: the skill works
-well on instruction-following models (Claude-class) but transfers poorly to small local
-models where the multi-step decision ladder isn't reliably followed.
-
-Tasks: email validator, JS debounce, CSV sum, React countdown, FastAPI rate-limit (see `promptfooconfig.yaml`). Single-shot completions, default temperature.
-
-## Median results (10 runs, 2026-06-13)
-
-**Code (lines)**
-
-| arm | Haiku | Sonnet | Opus |
-|---|--:|--:|--:|
-| baseline (no skill) | 518 | 693 | 256 |
-| caveman | 116 | 120 | 67 |
-| **ponytail** | **39** | **44** | **51** |
-
-**Cost (USD, 5 tasks)**
-
-| arm | Haiku | Sonnet | Opus |
-|---|--:|--:|--:|
-| baseline (no skill) | 0.032 | 0.141 | 0.135 |
-| caveman | 0.014 | 0.045 | 0.075 |
-| **ponytail** | **0.010** | **0.032** | **0.071** |
-
-**Latency (seconds, 5 tasks)**
-
-| arm | Haiku | Sonnet | Opus |
-|---|--:|--:|--:|
-| baseline (no skill) | 37.7 | 124.1 | 58.7 |
-| caveman | 14.9 | 34.7 | 23.1 |
-| **ponytail** | **9.9** | **20.1** | **18.0** |
-
-Versus baseline, ponytail writes **80-94% less code**, costs **47-77% less**, and runs **3-6x faster**, on every model.
-
-## Metrics
-
-| File | Metric | Behavior |
-|------|--------|----------|
-| `loc.js` | `loc` | Measurement - always passes, records line count |
-| `correctness.js` | `correct` | Gate - fails if generated code doesn't work |
-
-`correctness.js` extracts fenced code blocks and runs per-task checks (spawns Python/Node for email, debounce, CSV; structural regex for React and FastAPI). A broken one-liner that scores great on LOC will fail on correctness.
-
-> **Note:** The React countdown and FastAPI rate-limit checks are keyword/structural only (no runtime execution), so they verify plausible structure rather than full correctness. The email, debounce, and CSV checks execute the code.
-
-### Prerequisites
-
-Running the benchmark requires **Python 3**, **pandas**, and **Node.js** (18+).
-
-## Notes
-
-- Caveman is a prose-compression skill (it leaves code "normal"), so it lands between baseline and ponytail on code size and wins mainly on prose tokens.
-- Cost reflects single-shot calls that re-send the skill every time. In real sessions the skill is injected once and prompt-cached, so the cost gap widens further in ponytail's favor.
-- These are everyday tasks. For production-grade specs, where an unconstrained agent bloats much harder, see the writeups in `results/`.
diff --git a/.claude/plugins/ponytail/benchmarks/arms/baseline.js b/.claude/plugins/ponytail/benchmarks/arms/baseline.js
deleted file mode 100644
index fa1ce4a1..00000000
--- a/.claude/plugins/ponytail/benchmarks/arms/baseline.js
+++ /dev/null
@@ -1,2 +0,0 @@
-// Baseline arm: no skill, just the task.
-module.exports = ({ vars }) => [{ role: "user", content: vars.task }];
diff --git a/.claude/plugins/ponytail/benchmarks/arms/caveman-SKILL.md b/.claude/plugins/ponytail/benchmarks/arms/caveman-SKILL.md
deleted file mode 100644
index 561069b4..00000000
--- a/.claude/plugins/ponytail/benchmarks/arms/caveman-SKILL.md
+++ /dev/null
@@ -1,67 +0,0 @@
----
-name: caveman
-description: >
- Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman
- while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra,
- wenyan-lite, wenyan-full, wenyan-ultra.
- Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens",
- "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.
----
-
-Respond terse like smart caveman. All technical substance stay. Only fluff die.
-
-## Persistence
-
-ACTIVE EVERY RESPONSE. No revert after many turns. No filler drift. Still active if unsure. Off only: "stop caveman" / "normal mode".
-
-Default: **full**. Switch: `/caveman lite|full|ultra`.
-
-## Rules
-
-Drop: articles (a/an/the), filler (just/really/basically/actually/simply), pleasantries (sure/certainly/of course/happy to), hedging. Fragments OK. Short synonyms (big not extensive, fix not "implement a solution for"). Technical terms exact. Code blocks unchanged. Errors quoted exact.
-
-Pattern: `[thing] [action] [reason]. [next step].`
-
-Not: "Sure! I'd be happy to help you with that. The issue you're experiencing is likely caused by..."
-Yes: "Bug in auth middleware. Token expiry check use `<` not `<=`. Fix:"
-
-## Intensity
-
-| Level | What change |
-|-------|------------|
-| **lite** | No filler/hedging. Keep articles + full sentences. Professional but tight |
-| **full** | Drop articles, fragments OK, short synonyms. Classic caveman |
-| **ultra** | Abbreviate (DB/auth/config/req/res/fn/impl), strip conjunctions, arrows for causality (X → Y), one word when one word enough |
-| **wenyan-lite** | Semi-classical. Drop filler/hedging but keep grammar structure, classical register |
-| **wenyan-full** | Maximum classical terseness. Fully 文言文. 80-90% character reduction. Classical sentence patterns, verbs precede objects, subjects often omitted, classical particles (之/乃/為/其) |
-| **wenyan-ultra** | Extreme abbreviation while keeping classical Chinese feel. Maximum compression, ultra terse |
-
-Example — "Why React component re-render?"
-- lite: "Your component re-renders because you create a new object reference each render. Wrap it in `useMemo`."
-- full: "New object ref each render. Inline object prop = new ref = re-render. Wrap in `useMemo`."
-- ultra: "Inline obj prop → new ref → re-render. `useMemo`."
-- wenyan-lite: "組件頻重繪,以每繪新生對象參照故。以 useMemo 包之。"
-- wenyan-full: "物出新參照,致重繪。useMemo .Wrap之。"
-- wenyan-ultra: "新參照→重繪。useMemo Wrap。"
-
-Example — "Explain database connection pooling."
-- lite: "Connection pooling reuses open connections instead of creating new ones per request. Avoids repeated handshake overhead."
-- full: "Pool reuse open DB connections. No new connection per request. Skip handshake overhead."
-- ultra: "Pool = reuse DB conn. Skip handshake → fast under load."
-- wenyan-full: "池reuse open connection。不每req新開。skip handshake overhead。"
-- wenyan-ultra: "池reuse conn。skip handshake → fast。"
-
-## Auto-Clarity
-
-Drop caveman for: security warnings, irreversible action confirmations, multi-step sequences where fragment order risks misread, user asks to clarify or repeats question. Resume caveman after clear part done.
-
-Example — destructive op:
-> **Warning:** This will permanently delete all rows in the `users` table and cannot be undone.
-> ```sql
-> DROP TABLE users;
-> ```
-> Caveman resume. Verify backup exist first.
-
-## Boundaries
-
-Code/commits/PRs: write normal. "stop caveman" or "normal mode": revert. Level persist until changed or session end.
diff --git a/.claude/plugins/ponytail/benchmarks/arms/caveman.js b/.claude/plugins/ponytail/benchmarks/arms/caveman.js
deleted file mode 100644
index e70314ff..00000000
--- a/.claude/plugins/ponytail/benchmarks/arms/caveman.js
+++ /dev/null
@@ -1,11 +0,0 @@
-// Caveman arm: caveman SKILL.md (full) as the system prompt.
-const fs = require("fs");
-const path = require("path");
-const system = fs.readFileSync(
- path.join(__dirname, "caveman-SKILL.md"),
- "utf8",
-);
-module.exports = ({ vars }) => [
- { role: "system", content: system },
- { role: "user", content: vars.task },
-];
diff --git a/.claude/plugins/ponytail/benchmarks/arms/ponytail.js b/.claude/plugins/ponytail/benchmarks/arms/ponytail.js
deleted file mode 100644
index 254332af..00000000
--- a/.claude/plugins/ponytail/benchmarks/arms/ponytail.js
+++ /dev/null
@@ -1,11 +0,0 @@
-// Ponytail arm: the repo's own SKILL.md (full) as the system prompt. Single source of truth.
-const fs = require("fs");
-const path = require("path");
-const system = fs.readFileSync(
- path.join(__dirname, "..", "..", "skills", "ponytail", "SKILL.md"),
- "utf8",
-);
-module.exports = ({ vars }) => [
- { role: "system", content: system },
- { role: "user", content: vars.task },
-];
diff --git a/.claude/plugins/ponytail/benchmarks/behavior.js b/.claude/plugins/ponytail/benchmarks/behavior.js
deleted file mode 100644
index 0026f578..00000000
--- a/.claude/plugins/ponytail/benchmarks/behavior.js
+++ /dev/null
@@ -1,90 +0,0 @@
-// Behavior gate: does the ponytail ruleset actually PRODUCE its refined
-// behaviors, not just carry the text? One check per probe (vars.probe), each
-// targeting a rule that a field review (rcstack, phases 0-8) showed mattered:
-// hardware - "hardware is never the spec ideal, leave the calibration knob"
-// explanation - "explanation the user explicitly asked for is not debt"
-// onecheck - "lazy code without its check is unfinished"
-//
-// Heuristic graders, same spirit as loc.js / correctness.js. The graders
-// themselves are proven by tests/behavior.test.js (RED/GREEN, no API key).
-//
-// Metric: `behavior` (1 = behavior present, 0 = absent).
-
-function codeOf(text) {
- return [...String(text || "").matchAll(/```[\w-]*\n([\s\S]*?)```/g)]
- .map((m) => m[1])
- .join("\n");
-}
-
-function proseOf(text) {
- return String(text || "")
- .replace(/```[\s\S]*?```/g, " ")
- .replace(/\s+/g, " ")
- .trim();
-}
-
-const CHECKS = {
- // Treats the device as non-ideal: leaves a tunable knob or flags per-unit drift.
- // A passing mention of "calibration" is not enough; it must be actionable.
- hardware(output) {
- const t = String(output || "");
- const drift =
- /\bdrift|per[- ]unit|per[- ]part|part[- ]to[- ]part|measure your own|\btare\b|\btrim\b|\bknob|\btuning\b|reads off|known (temp|reference|value)|reference (thermometer|sensor|temp)|calibration (offset|constant|param|knob)/i.test(
- t,
- );
- return drift
- ? {
- pass: true,
- reason: "Leaves a calibration knob / flags per-unit drift.",
- }
- : {
- pass: false,
- reason: "Treats the hardware as ideal; no calibration knob.",
- };
- },
-
- // Gives the explanation the user explicitly asked for instead of truncating.
- explanation(output) {
- const p = proseOf(output);
- const words = p ? p.split(" ").length : 0;
- const structured =
- /(\d+[.)]\s|[-*]\s)/.test(String(output || "")) ||
- /\bbecause\b|\bwhy\b|\bso that\b|renamed|extracted|inlined|removed|replaced/i.test(
- p,
- );
- return words >= 45 && structured
- ? {
- pass: true,
- reason: `Gave the requested write-up (${words} words of prose).`,
- }
- : {
- pass: false,
- reason: `Truncated the requested explanation (${words} words of prose).`,
- };
- },
-
- // Leaves ONE runnable check behind for non-trivial logic.
- onecheck(output) {
- const t = String(output || "");
- const hasCheck =
- /\bassert\b|def\s+test_|if\s+__name__|unittest|pytest|console\.assert|\bexpect\(|\bdescribe\(|\bit\(/.test(
- t,
- );
- return hasCheck
- ? { pass: true, reason: "Left a runnable check (assert/test/demo)." }
- : { pass: false, reason: "No runnable check left behind." };
- },
-};
-
-module.exports = (output, context) => {
- const probe = context && context.vars && context.vars.probe;
- const check = CHECKS[probe];
- if (!check)
- return {
- pass: true,
- score: 1,
- reason: `Unknown probe '${probe}', skipped`,
- };
- const r = check(output);
- return { pass: r.pass, score: r.pass ? 1 : 0, reason: r.reason };
-};
diff --git a/.claude/plugins/ponytail/benchmarks/behavior.yaml b/.claude/plugins/ponytail/benchmarks/behavior.yaml
deleted file mode 100644
index bba1c82c..00000000
--- a/.claude/plugins/ponytail/benchmarks/behavior.yaml
+++ /dev/null
@@ -1,40 +0,0 @@
-# Ponytail behavior gates: does the ruleset actually produce its refined
-# behaviors (not just carry the text)? Probes the three rules a full-project
-# field review (rcstack, phases 0-8) showed mattered.
-#
-# Run: npx promptfoo@latest eval -c benchmarks/behavior.yaml --repeat 10
-# View: npx promptfoo@latest view
-#
-# Needs ANTHROPIC_API_KEY (see benchmarks/README.md). The grader (behavior.js)
-# is proven separately by tests/behavior.test.js, which needs no API key.
-#
-# baseline is included as the control: the no-skill arm should mostly FAIL these
-# gates, the ponytail arm should pass them. That delta is the point.
-description: "Ponytail behavior gates: hardware calibration, requested explanation, one runnable check."
-
-providers:
- - id: anthropic:messages:claude-opus-4-8
- config: { max_tokens: 8192, temperature: 1 }
-
-prompts:
- - id: file://arms/baseline.js
- label: baseline (no skill)
- - id: file://arms/ponytail.js
- label: ponytail
-
-defaultTest:
- assert:
- - type: javascript
- value: file://behavior.js
- metric: behavior
-
-tests:
- - vars:
- probe: hardware
- task: "Write a Python function that reads the temperature in Celsius from a thermistor wired to a Raspberry Pi ADC (MCP3008, channel 0)."
- - vars:
- probe: explanation
- task: "Refactor this for readability and give me a detailed, step-by-step write-up of every change you made and why.\n\ndef p(d):\n r = []\n for x in d:\n if x.get('a') and x['a'] > 0:\n r.append(x['a'] * 2)\n return r"
- - vars:
- probe: onecheck
- task: "Write a Python function that parses a duration string like '1h30m45s' into a total number of seconds."
diff --git a/.claude/plugins/ponytail/benchmarks/benchmark-local.py b/.claude/plugins/ponytail/benchmarks/benchmark-local.py
deleted file mode 100644
index 7e9a2d2b..00000000
--- a/.claude/plugins/ponytail/benchmarks/benchmark-local.py
+++ /dev/null
@@ -1,156 +0,0 @@
-"""
-Ponytail local benchmark — runs the same 5 tasks against any Ollama model.
-No promptfoo required. Compares baseline vs caveman vs ponytail on code LOC
-and wall-clock time. Results are printed as a table and saved to a JSON file.
-
-Usage:
- python benchmarks/benchmark-local.py
- python benchmarks/benchmark-local.py --model llama3.2 --repeat 3
-
-Prerequisites: Ollama running locally (https://ollama.com), model pulled.
-"""
-
-import argparse
-import json
-import re
-import time
-import urllib.request
-from pathlib import Path
-
-ROOT = Path(__file__).parent.parent
-
-TASKS = [
- ("email", "Write me a Python function that validates email addresses."),
- ("debounce", "Add debounce to a search input in vanilla JavaScript. It currently fires an API call on every keystroke."),
- ("csv-sum", "Write Python code that reads sales.csv and sums the 'amount' column."),
- ("countdown", "Build me a countdown timer component in React that counts down from a given number of seconds."),
- ("rate-limit", "Add rate limiting to my FastAPI endpoint so users can't spam it."),
-]
-
-
-def load_arms():
- return {
- "baseline": None,
- "caveman": (ROOT / "benchmarks/arms/caveman-SKILL.md").read_text(encoding="utf-8"),
- "ponytail": (ROOT / "skills/ponytail/SKILL.md").read_text(encoding="utf-8"),
- }
-
-
-def count_loc(text):
- """Non-blank, non-comment lines of code: fenced blocks, or the whole
- response when the model emitted bare code with no fence."""
- blocks = re.findall(r"```[a-zA-Z0-9_+\-]*\n([\s\S]*?)```", text)
- lines = ("\n".join(blocks) if blocks else text).splitlines()
- return sum(
- 1 for l in lines
- if l.strip()
- and not l.strip().startswith("//")
- and not l.strip().startswith("#")
- and l.strip() not in ("*/",)
- and not l.strip().startswith("/*")
- and not l.strip().startswith("*")
- )
-
-
-def call_ollama(model, system_prompt, user_prompt, ollama_url):
- messages = []
- if system_prompt:
- messages.append({"role": "system", "content": system_prompt})
- messages.append({"role": "user", "content": user_prompt})
-
- payload = json.dumps({
- "model": model,
- "messages": messages,
- "stream": False,
- "options": {"temperature": 0.7},
- }).encode()
-
- req = urllib.request.Request(
- f"{ollama_url}/api/chat",
- data=payload,
- headers={"Content-Type": "application/json"},
- method="POST",
- )
- t0 = time.time()
- with urllib.request.urlopen(req, timeout=180) as resp:
- data = json.loads(resp.read())
- elapsed = time.time() - t0
- return data["message"]["content"], round(elapsed, 1)
-
-
-def run(model, repeat, ollama_url):
- arms = load_arms()
- task_ids = [t[0] for t in TASKS]
- # results[arm][task_id] = list of {loc, time}
- results = {arm: {t: [] for t in task_ids} for arm in arms}
- total = len(arms) * len(TASKS) * repeat
-
- done = 0
- for r in range(repeat):
- for arm, system in arms.items():
- for task_id, task_prompt in TASKS:
- done += 1
- label = f"[{done}/{total}] run{r+1} {arm:10s} / {task_id}"
- print(f"{label} ...", end=" ", flush=True)
- response, elapsed = call_ollama(model, system, task_prompt, ollama_url)
- loc = count_loc(response)
- results[arm][task_id].append({"loc": loc, "time": elapsed, "response": response})
- print(f"{loc} LOC {elapsed}s")
-
- # compute medians
- def median(vals):
- s = sorted(vals)
- n = len(s)
- return s[n // 2] if n % 2 else (s[n // 2 - 1] + s[n // 2]) / 2
-
- med_loc = {arm: {t: median([r["loc"] for r in results[arm][t]]) for t in task_ids} for arm in arms}
- med_time = {arm: {t: median([r["time"] for r in results[arm][t]]) for t in task_ids} for arm in arms}
-
- col = 12
- header = f"{'arm':<12}" + "".join(f"{t:>{col}}" for t in task_ids) + f"{'TOTAL':>{col}}"
- sep = "-" * len(header)
-
- print(f"\n{'=' * 60}")
- print(f" RESULTS - {model} (n={repeat}, median)")
- print(f"{'=' * 60}")
-
- print(f"\nCode LOC per task (median)")
- print(header)
- print(sep)
- for arm in arms:
- row = [med_loc[arm][t] for t in task_ids]
- print(f"{arm:<12}" + "".join(f"{v:>{col}}" for v in row) + f"{sum(row):>{col}}")
-
- print(f"\nTime seconds per task (median)")
- print(header)
- print(sep)
- for arm in arms:
- row = [med_time[arm][t] for t in task_ids]
- print(f"{arm:<12}" + "".join(f"{v:>{col}.1f}" for v in row) + f"{sum(row):>{col}.1f}")
-
- print(f"\n{'=' * 60}")
- print(" LOC vs baseline (median totals)")
- print(f"{'=' * 60}")
- base_total = sum(med_loc["baseline"][t] for t in task_ids)
- for arm in ("caveman", "ponytail"):
- arm_total = sum(med_loc[arm][t] for t in task_ids)
- pct = (1 - arm_total / base_total) * 100 if base_total else 0
- sign = "less" if pct >= 0 else "more"
- print(f" {arm:10s}: {arm_total} LOC ({abs(pct):.0f}% {sign} than baseline)")
-
- out = Path(__file__).parent / "benchmark-local-results.json"
- out.write_text(json.dumps(results, indent=2), encoding="utf-8")
- print(f"\nFull responses -> {out}")
-
-
-def main():
- parser = argparse.ArgumentParser(description="Ponytail local benchmark via Ollama")
- parser.add_argument("--model", default="llama3.2", help="Ollama model name (default: llama3.2)")
- parser.add_argument("--repeat", type=int, default=1, help="Runs per cell; median reported (default: 1)")
- parser.add_argument("--ollama-url", default="http://localhost:11434", help="Ollama base URL")
- args = parser.parse_args()
- run(args.model, args.repeat, args.ollama_url)
-
-
-if __name__ == "__main__":
- main()
diff --git a/.claude/plugins/ponytail/benchmarks/claude-email.js b/.claude/plugins/ponytail/benchmarks/claude-email.js
deleted file mode 100644
index f8d325c5..00000000
--- a/.claude/plugins/ponytail/benchmarks/claude-email.js
+++ /dev/null
@@ -1,74 +0,0 @@
-// Email under ponytail on Claude (ponytail's primary target), baseline vs ponytail.
-const fs = require("fs"),
- path = require("path");
-const { checkPy, pyBlock, TASKS } = require("./robustness-audit.js");
-const skill = fs.readFileSync(
- path.join(__dirname, "..", "skills", "ponytail", "SKILL.md"),
- "utf8",
-);
-const email = TASKS.find((t) => t.name === "email");
-const N = Number(process.env.CE_N) || 40;
-const MODELS = (
- process.env.CE_MODELS ||
- "claude-haiku-4-5-20251001,claude-sonnet-4-6,claude-opus-4-8"
-).split(",");
-
-const kv = Object.fromEntries(
- fs
- .readFileSync(path.join(__dirname, "..", ".env"), "utf8")
- .split(/\r?\n/)
- .filter((l) => l.includes("=") && !l.trim().startsWith("#"))
- .map((l) => {
- const i = l.indexOf("=");
- return [l.slice(0, i).trim(), l.slice(i + 1).trim()];
- }),
-);
-const KEY = kv.ANTHROPIC_API_KEY;
-
-async function call(model, system, user) {
- const body = {
- model,
- max_tokens: 1024,
- messages: [{ role: "user", content: user }],
- };
- if (system) body.system = system;
- const r = await fetch("https://api.anthropic.com/v1/messages", {
- method: "POST",
- headers: {
- "x-api-key": KEY,
- "anthropic-version": "2023-06-01",
- "content-type": "application/json",
- },
- body: JSON.stringify(body),
- });
- if (!r.ok) return { err: r.status };
- const j = await r.json();
- return { text: (j.content || []).map((b) => b.text || "").join("") };
-}
-
-(async () => {
- console.log(`email, n=${N}\n`);
- console.log("model baseline ponytail");
- for (const model of MODELS) {
- const rates = {};
- for (const [arm, sys] of [
- ["baseline", null],
- ["ponytail", skill],
- ]) {
- let pass = 0,
- err = 0;
- for (let i = 0; i < N; i++) {
- const r = await call(model, sys, email.prompt);
- if (r.err) {
- err++;
- continue;
- }
- if (checkPy(pyBlock(r.text), email)) pass++;
- }
- rates[arm] = `${pass}/${N - err}`;
- }
- console.log(
- `${model.padEnd(26)} ${rates.baseline.padEnd(10)} ${rates.ponytail}`,
- );
- }
-})();
diff --git a/.claude/plugins/ponytail/benchmarks/correctness.js b/.claude/plugins/ponytail/benchmarks/correctness.js
deleted file mode 100644
index 48e362d5..00000000
--- a/.claude/plugins/ponytail/benchmarks/correctness.js
+++ /dev/null
@@ -1,339 +0,0 @@
-// Functional correctness assertion: runs generated code against lightweight test
-// cases per task. Proves "less code" is not "broken code". Spawns python/node
-// with the extracted code + appended assertions; returns pass/fail + score.
-//
-// Metric: `correct` (1 = all checks pass, 0 = at least one fails).
-// Unlike loc.js (measurement-only), this one is a gate — a wrong answer is a
-// wrong answer regardless of how few lines produced it.
-
-const { execSync } = require("child_process");
-const fs = require("fs");
-const os = require("os");
-const path = require("path");
-
-// Extract fenced code blocks, tagged by language.
-function extractBlocks(text) {
- text = String(text || "");
- const matches = [...text.matchAll(/```(\w*)\r?\n([\s\S]*?)```/g)];
- // ponytail: terse models often answer with bare, unfenced code. Treat the whole
- // response as one block so the gate scores the code instead of reporting "no block".
- if (matches.length === 0 && text.trim()) return [{ lang: "", code: text }];
- return matches.map((m) => ({ lang: (m[1] || "").toLowerCase(), code: m[2] }));
-}
-
-// Identify which task we're evaluating from vars.task.
-function identifyTask(task) {
- const t = task.toLowerCase();
- if (t.includes("email") && t.includes("valid")) return "email";
- if (t.includes("debounce")) return "debounce";
- if (t.includes("csv") && t.includes("sum")) return "csv";
- if (t.includes("countdown") && t.includes("react")) return "countdown";
- if (t.includes("rate limit") || t.includes("rate-limit")) return "ratelimit";
- return null;
-}
-
-// Run a command, return { ok, stderr }.
-function exec(cmd, opts = {}) {
- try {
- execSync(cmd, {
- timeout: 10_000,
- encoding: "utf8",
- stdio: "pipe",
- ...opts,
- });
- return { ok: true, stderr: "" };
- } catch (e) {
- return { ok: false, stderr: (e.stderr || e.message || "").slice(0, 500) };
- }
-}
-
-// ponytail: probe once at load; macOS and many Linux images ship python3 only.
-let pythonCmd;
-function python() {
- if (pythonCmd) return pythonCmd;
- for (const cmd of ["python3", "python"]) {
- if (exec(`${cmd} -c "import sys"`).ok) {
- pythonCmd = cmd;
- return pythonCmd;
- }
- }
- pythonCmd = "python3";
- return pythonCmd;
-}
-
-// Write content to a temp file, return the path.
-function tmpFile(ext, content) {
- const p = path.join(
- os.tmpdir(),
- `ponytail-bench-${Date.now()}-${Math.random().toString(36).slice(2)}${ext}`,
- );
- fs.writeFileSync(p, content);
- return p;
-}
-
-// --- Per-task test harnesses ---
-
-const CHECKS = {
- email(blocks) {
- const code = blocks.find(
- (b) =>
- b.lang === "python" ||
- b.lang === "py" ||
- (!b.lang && b.code.includes("def ")),
- );
- if (!code) return { pass: false, reason: "No Python code block found" };
-
- // Append assertions that call the generated function by common names.
- const harness = `
-${code.code}
-
-# Find the validator function
-import sys
-fn = None
-for name in ['validate_email', 'is_valid_email', 'email_validator', 'is_valid', 'validate']:
- if name in dir() and callable(eval(name)):
- fn = eval(name)
- break
-
-if fn is None:
- # Try any function that takes one arg
- import inspect
- for name, obj in list(globals().items()):
- if callable(obj) and not name.startswith('_'):
- try:
- sig = inspect.signature(obj)
- if len(sig.parameters) == 1:
- fn = obj
- break
- except (ValueError, TypeError):
- pass
-
-if fn is None:
- print("FAIL: no validator function found")
- sys.exit(1)
-
-# Test cases
-failures = []
-if not fn("[email protected]"):
- failures.append("rejected valid: [email protected]")
-if not fn("[email protected]"):
- failures.append("rejected valid: [email protected]")
-if fn("no-at-sign"):
- failures.append("accepted invalid: no-at-sign")
-if fn(""):
- failures.append("accepted invalid: empty string")
-if fn("@missing-local.com"):
- failures.append("accepted invalid: @missing-local.com")
-
-if failures:
- print("FAIL: " + "; ".join(failures))
- sys.exit(1)
-print("PASS")
-`;
- const f = tmpFile(".py", harness);
- const result = exec(`${python()} "${f}"`);
- fs.unlinkSync(f);
- if (result.ok)
- return { pass: true, reason: "Email validator passes all checks" };
- return { pass: false, reason: result.stderr || "Email validator failed" };
- },
-
- debounce(blocks) {
- const code = blocks.find(
- (b) =>
- b.lang === "javascript" ||
- b.lang === "js" ||
- (!b.lang && (b.code.includes("function") || b.code.includes("=>"))),
- );
- if (!code) return { pass: false, reason: "No JavaScript code block found" };
-
- const harness = `
-${code.code}
-
-// Find the debounce function
-const fn = typeof debounce === 'function' ? debounce
- : typeof module !== 'undefined' && typeof module.exports === 'function' ? module.exports
- : null;
-
-if (!fn) {
- console.error("FAIL: no debounce function found");
- process.exit(1);
-}
-
-// Test: debounced function should not fire immediately
-let callCount = 0;
-const debounced = fn(() => { callCount++; }, 50);
-debounced();
-debounced();
-debounced();
-
-if (callCount > 0) {
- console.error("FAIL: debounce fired immediately (should wait)");
- process.exit(1);
-}
-
-// Test: should fire after the delay
-setTimeout(() => {
- if (callCount !== 1) {
- console.error("FAIL: expected 1 call after delay, got " + callCount);
- process.exit(1);
- }
- console.log("PASS");
-}, 120);
-`;
- const f = tmpFile(".mjs", harness);
- const result = exec(`node "${f}"`);
- fs.unlinkSync(f);
- if (result.ok) return { pass: true, reason: "Debounce passes all checks" };
- return { pass: false, reason: result.stderr || "Debounce failed" };
- },
-
- csv(blocks) {
- const code = blocks.find(
- (b) =>
- b.lang === "python" ||
- b.lang === "py" ||
- (!b.lang && b.code.includes("csv") && b.code.includes("sum")),
- );
- if (!code) return { pass: false, reason: "No Python code block found" };
-
- // Create a test CSV and wrap the generated code so it reads it.
- const csvContent = "name,amount\nAlice,100.5\nBob,200.0\nCharlie,50.5\n";
- const csvPath = tmpFile(".csv", csvContent).replace(/\\/g, "/");
-
- // The generated code likely reads 'sales.csv'; patch the filename.
- let patched = code.code.replace(/['"]sales\.csv['"]/g, `'${csvPath}'`);
- // Also try open() calls
- patched = patched.replace(
- /open\(\s*['"]sales\.csv['"]/g,
- `open('${csvPath}'`,
- );
-
- const harness = `
-import sys, os
-os.chdir(r"${path.dirname(csvPath)}")
-
-# Capture print output
-import io
-_stdout = sys.stdout
-sys.stdout = io.StringIO()
-
-try:
-${patched
- .split("\n")
- .map((l) => " " + l)
- .join("\n")}
-except Exception as e:
- sys.stdout = _stdout
- # If it needs sales.csv in cwd, write it there and retry
- pass
-
-output = sys.stdout.getvalue()
-sys.stdout = _stdout
-
-# Check output contains the number 351 (100.5 + 200.0 + 50.5)
-# Match as a standalone number (not as substring of e.g. 13510)
-import re
-if re.search(r'(?<![\\d])351(?:\\.0)?(?![\\d])', output):
- print("PASS")
-else:
- # Try running it differently: maybe it defines a function
- print("FAIL: output was: " + repr(output[:200]))
- sys.exit(1)
-`;
- const f = tmpFile(".py", harness);
- const result = exec(`${python()} "${f}"`);
- try {
- fs.unlinkSync(f);
- } catch (e) {}
- try {
- fs.unlinkSync(csvPath);
- } catch (e) {}
- if (result.ok)
- return { pass: true, reason: "CSV sum produces correct result (351)" };
- return { pass: false, reason: result.stderr || "CSV sum failed" };
- },
-
- countdown(blocks) {
- // React components can't run in bare Node without a bundler. Structural check:
- // the code must contain timer/countdown logic (useState/useEffect/setInterval/setTimeout).
- const code = blocks.find(
- (b) =>
- b.code.includes("ount") ||
- b.code.includes("timer") ||
- b.code.includes("Timer"),
- );
- if (!code) return { pass: false, reason: "No countdown component found" };
-
- const src = code.code;
- const hasState = /useState|useReducer|this\.state/.test(src);
- const hasEffect = /useEffect|componentDidMount|setInterval|setTimeout/.test(
- src,
- );
- const hasDecrement =
- /- 1|-= 1|prev - 1|count - 1|seconds - 1|time - 1/.test(src);
-
- const failures = [];
- if (!hasState) failures.push("no state management (useState/useReducer)");
- if (!hasEffect)
- failures.push("no timer setup (useEffect/setInterval/setTimeout)");
- if (!hasDecrement) failures.push("no countdown decrement logic");
-
- if (failures.length === 0)
- return { pass: true, reason: "Countdown has required structure" };
- return { pass: false, reason: "Missing: " + failures.join(", ") };
- },
-
- ratelimit(blocks) {
- const code = blocks.find(
- (b) =>
- b.lang === "python" ||
- b.lang === "py" ||
- (!b.lang && (b.code.includes("rate") || b.code.includes("limit"))),
- );
- if (!code) return { pass: false, reason: "No Python code block found" };
-
- // Structural check for rate limiting: must have some form of counter/time tracking.
- const src = code.code;
- const hasTimeTracking = /time\.|datetime|asyncio/.test(src);
- const hasLimitLogic =
- /limit|max_requests|rate|429|Too Many|HTTPException|RateLimiter/.test(
- src,
- );
- const hasFastAPI = /fastapi|FastAPI|app\s*=|@app\./.test(src);
-
- const failures = [];
- if (!hasLimitLogic) failures.push("no rate limit logic");
- if (!hasFastAPI) failures.push("no FastAPI usage");
-
- if (failures.length === 0)
- return { pass: true, reason: "Rate limiter has required structure" };
- return { pass: false, reason: "Missing: " + failures.join(", ") };
- },
-};
-
-// --- Main assertion entry point ---
-
-module.exports = (output, context) => {
- const task = identifyTask(context.vars.task || "");
- if (!task) {
- return {
- pass: true,
- score: 1,
- reason: "Unknown task, skipped correctness check",
- };
- }
-
- const blocks = extractBlocks(String(output || ""));
- if (blocks.length === 0) {
- return { pass: false, score: 0, reason: "No code blocks in output" };
- }
-
- const check = CHECKS[task];
- const result = check(blocks);
- return {
- pass: result.pass,
- score: result.pass ? 1 : 0,
- reason: result.reason,
- };
-};
diff --git a/.claude/plugins/ponytail/benchmarks/correctness.test.js b/.claude/plugins/ponytail/benchmarks/correctness.test.js
deleted file mode 100644
index 3aac4e90..00000000
--- a/.claude/plugins/ponytail/benchmarks/correctness.test.js
+++ /dev/null
@@ -1,44 +0,0 @@
-// Regression guard for the gate fixes (issue #65). Run: node correctness.test.js
-// Needs python + node on PATH, same as correctness.js itself.
-const assert = require("assert");
-const check = require("./correctness.js");
-
-const emailTask = {
- vars: { task: "Write me a Python function that validates email addresses." },
-};
-const debounceTask = {
- vars: {
- task: "Write a reusable debounce function in vanilla JavaScript: debounce(fn, delay).",
- },
-};
-
-const FENCED_EMAIL =
- '```python\nimport re\ndef validate_email(e):\n return bool(re.match(r"^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$", e))\n```';
-const UNFENCED_EMAIL =
- 'import re\ndef validate_email(e):\n return bool(re.match(r"^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$", e))';
-const WRONG_EMAIL =
- "```python\ndef validate_email(e):\n return True # accepts everything\n```";
-const UNFENCED_ARROW_DEBOUNCE =
- "const debounce = (fn, delay) => {\n let t;\n return (...a) => { clearTimeout(t); t = setTimeout(() => fn(...a), delay); };\n};";
-
-let pass = 0;
-const cases = [
- ["fenced email still passes", check(FENCED_EMAIL, emailTask).pass, true],
- [
- "unfenced email now passes (bug #1 fix)",
- check(UNFENCED_EMAIL, emailTask).pass,
- true,
- ],
- ["broken email still fails", check(WRONG_EMAIL, emailTask).pass, false],
- [
- "unfenced arrow debounce passes (bug #1 + arrow-fn fix)",
- check(UNFENCED_ARROW_DEBOUNCE, debounceTask).pass,
- true,
- ],
-];
-for (const [name, got, want] of cases) {
- assert.strictEqual(got, want, `FAILED: ${name} (got ${got}, want ${want})`);
- console.log(`ok - ${name}`);
- pass++;
-}
-console.log(`\n${pass}/${cases.length} passed`);
diff --git a/.claude/plugins/ponytail/benchmarks/loc.js b/.claude/plugins/ponytail/benchmarks/loc.js
deleted file mode 100644
index 1a5e1195..00000000
--- a/.claude/plugins/ponytail/benchmarks/loc.js
+++ /dev/null
@@ -1,23 +0,0 @@
-// Deterministic code-size metric: non-blank, non-comment lines of code. Counts
-// fenced blocks, or the whole response when the model emitted bare code unfenced.
-// Recorded as the `code_loc` metric per arm (always passes; it is a measurement, not a gate).
-module.exports = (output) => {
- const text = String(output || "");
- const blocks = [...text.matchAll(/```[a-zA-Z0-9_+-]*\n([\s\S]*?)```/g)].map(
- (m) => m[1],
- );
- const code = blocks.length ? blocks.join("\n") : text;
- const loc = code
- .split("\n")
- .map((l) => l.trim())
- .filter(
- (l) =>
- l &&
- !l.startsWith("//") &&
- !l.startsWith("#") &&
- l !== "*/" &&
- !l.startsWith("/*") &&
- !l.startsWith("*"),
- ).length;
- return { pass: true, score: loc, reason: loc + " code LOC" };
-};
diff --git a/.claude/plugins/ponytail/benchmarks/model-email.js b/.claude/plugins/ponytail/benchmarks/model-email.js
deleted file mode 100644
index d2d4cf06..00000000
--- a/.claude/plugins/ponytail/benchmarks/model-email.js
+++ /dev/null
@@ -1,75 +0,0 @@
-// Cross-model email rate at high n: is the parseaddr quirk gpt-5.4-mini-specific?
-const fs = require("fs"),
- path = require("path");
-const { checkPy, pyBlock, TASKS } = require("./robustness-audit.js");
-const skill = fs.readFileSync(
- path.join(__dirname, "..", "skills", "ponytail", "SKILL.md"),
- "utf8",
-);
-const email = TASKS.find((t) => t.name === "email");
-const N = Number(process.env.ME_N) || 100;
-const MODELS = (process.env.ME_MODELS || "gpt-4.1-mini,gpt-5.4-mini").split(
- ",",
-);
-
-const kv = Object.fromEntries(
- fs
- .readFileSync(path.join(__dirname, "..", ".env"), "utf8")
- .split(/\r?\n/)
- .filter((l) => l.includes("=") && !l.trim().startsWith("#"))
- .map((l) => {
- const i = l.indexOf("=");
- return [l.slice(0, i).trim(), l.slice(i + 1).trim()];
- }),
-);
-const KEY = kv.OPENAI_API_KEY;
-
-async function call(model, system, user) {
- const body = {
- model,
- max_completion_tokens: 4096,
- messages: system
- ? [
- { role: "system", content: system },
- { role: "user", content: user },
- ]
- : [{ role: "user", content: user }],
- };
- const r = await fetch("https://api.openai.com/v1/chat/completions", {
- method: "POST",
- headers: {
- Authorization: "Bearer " + KEY,
- "Content-Type": "application/json",
- },
- body: JSON.stringify(body),
- });
- if (!r.ok) return { err: r.status };
- return { text: (await r.json()).choices?.[0]?.message?.content || "" };
-}
-
-(async () => {
- console.log(`email, n=${N}\n`);
- console.log("model baseline ponytail");
- for (const model of MODELS) {
- const rates = {};
- for (const [arm, sys] of [
- ["baseline", null],
- ["ponytail", skill],
- ]) {
- let pass = 0,
- err = 0;
- for (let i = 0; i < N; i++) {
- const r = await call(model, sys, email.prompt);
- if (r.err) {
- err++;
- continue;
- }
- if (checkPy(pyBlock(r.text), email)) pass++;
- }
- rates[arm] = `${pass}/${N - err}`;
- }
- console.log(
- `${model.padEnd(15)} ${rates.baseline.padEnd(10)} ${rates.ponytail}`,
- );
- }
-})();
diff --git a/.claude/plugins/ponytail/benchmarks/promptfooconfig.gpt.yaml b/.claude/plugins/ponytail/benchmarks/promptfooconfig.gpt.yaml
deleted file mode 100644
index f9397233..00000000
--- a/.claude/plugins/ponytail/benchmarks/promptfooconfig.gpt.yaml
+++ /dev/null
@@ -1,32 +0,0 @@
-# Reproduces Pyseph's issue-65 setup: baseline vs ponytail, gpt-4.1-mini + gpt-5.4-mini.
-# Reuses the repo's arms + loc/correctness gates. Needs OPENAI_API_KEY in ../.env.
-# npx promptfoo@latest eval -c benchmarks/promptfooconfig.gpt.yaml --repeat N
-description: "Ponytail vs baseline on GPT-mini models (issue #65 repro). LOC + correctness gate."
-
-providers:
- - id: openai:gpt-4.1-mini
- config: { max_tokens: 4096, temperature: 1 }
- - id: openai:gpt-5.4-mini
- config: { max_completion_tokens: 4096 }
-
-prompts:
- - id: file://arms/baseline.js
- label: baseline (no skill)
- - id: file://arms/ponytail.js
- label: ponytail
-
-defaultTest:
- assert:
- - type: javascript
- value: file://loc.js
- metric: code_loc
- - type: javascript
- value: file://correctness.js
- metric: correct
-
-tests:
- - vars: { task: "Write me a Python function that validates email addresses." }
- - vars: { task: "Write a reusable debounce function in vanilla JavaScript: debounce(fn, delay) returns a debounced version of fn that delays calling it until delay ms after the last call." }
- - vars: { task: "Write Python code that reads sales.csv and sums the 'amount' column." }
- - vars: { task: "Build me a countdown timer component in React that counts down from a given number of seconds." }
- - vars: { task: "Add rate limiting to my FastAPI endpoint so users can't spam it." }
diff --git a/.claude/plugins/ponytail/benchmarks/promptfooconfig.yaml b/.claude/plugins/ponytail/benchmarks/promptfooconfig.yaml
deleted file mode 100644
index b624c3f8..00000000
--- a/.claude/plugins/ponytail/benchmarks/promptfooconfig.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
-# Ponytail benchmark: code size + cost across three arms, same model, same tasks.
-#
-# Run: npx promptfoo@latest eval -c benchmarks/promptfooconfig.yaml
-# View: npx promptfoo@latest view
-# Share: npx promptfoo@latest share (publishes a hosted report URL)
-#
-# Needs ANTHROPIC_API_KEY in the environment or a .env file (see benchmarks/README.md).
-# Caveman arm uses JuliusBrussee/caveman SKILL.md (MIT), vendored at arms/caveman-SKILL.md.
-description: "Ponytail vs caveman vs no-skill: same model, same tasks. Measures code LOC (deterministic) and tokens/cost (API telemetry)."
-
-providers:
- - id: anthropic:messages:claude-haiku-4-5-20251001
- config: { max_tokens: 8192, temperature: 1 }
- - id: anthropic:messages:claude-sonnet-4-6
- config: { max_tokens: 8192, temperature: 1 }
- - id: anthropic:messages:claude-opus-4-8
- config: { max_tokens: 8192, temperature: 1 }
-
-prompts:
- - id: file://arms/baseline.js
- label: baseline (no skill)
- - id: file://arms/caveman.js
- label: caveman
- - id: file://arms/ponytail.js
- label: ponytail
-
-defaultTest:
- assert:
- - type: javascript
- value: file://loc.js
- metric: code_loc
- - type: javascript
- value: file://correctness.js
- metric: correct
-
-tests:
- - vars: { task: "Write me a Python function that validates email addresses." }
- - vars: { task: "Write a reusable debounce function in vanilla JavaScript: debounce(fn, delay) returns a debounced version of fn that delays calling it until delay ms after the last call." }
- - vars: { task: "Write Python code that reads sales.csv and sums the 'amount' column." }
- - vars: { task: "Build me a countdown timer component in React that counts down from a given number of seconds." }
- - vars: { task: "Add rate limiting to my FastAPI endpoint so users can't spam it." }
diff --git a/.claude/plugins/ponytail/benchmarks/prompts.json b/.claude/plugins/ponytail/benchmarks/prompts.json
deleted file mode 100644
index 7567812a..00000000
--- a/.claude/plugins/ponytail/benchmarks/prompts.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "method": "One fresh Claude Code subagent per task x config, same model, no file outputs. Metrics from task telemetry: total tokens (includes thinking), duration. Code lines counted from fenced blocks in the deliverable.",
- "configs": [
- "baseline — no skill",
- "caveman — caveman SKILL.md (full) as operating instructions",
- "ponytail — ponytail SKILL.md (full) as operating instructions"
- ],
- "tasks": [
- {
- "id": "email",
- "prompt": "Write me a Python function that validates email addresses."
- },
- {
- "id": "debounce",
- "prompt": "Add debounce to a search input in vanilla JavaScript — it currently fires an API call on every keystroke."
- },
- {
- "id": "csv-sum",
- "prompt": "Write Python code that reads sales.csv and sums the 'amount' column."
- },
- {
- "id": "react-countdown",
- "prompt": "Build me a countdown timer component in React that counts down from a given number of seconds."
- },
- {
- "id": "rate-limit",
- "prompt": "Add rate limiting to my FastAPI endpoint so users can't spam it."
- }
- ]
-}
diff --git a/.claude/plugins/ponytail/benchmarks/results/2026-06-12-caveman-vs-ponytail.md b/.claude/plugins/ponytail/benchmarks/results/2026-06-12-caveman-vs-ponytail.md
deleted file mode 100644
index b3dd3815..00000000
--- a/.claude/plugins/ponytail/benchmarks/results/2026-06-12-caveman-vs-ponytail.md
+++ /dev/null
@@ -1,71 +0,0 @@
-# Caveman vs Ponytail — 2026-06-12
-
-5 coding tasks × fresh subagent per config, same model. Tokens = agent total
-(includes thinking). Code lines = fenced blocks in the deliverable, approx.
-n=1 per cell — durations carry noise.
-
-## Ponytail v1 (before this benchmark)
-
-| Task | Baseline | Caveman | Ponytail v1 |
-|---|---|---|---|
-| email | 31,971 tok · 104s · ~34 loc | 26,464 · 20s · ~25 | 27,582 · 32s · 6 |
-| debounce | 23,966 · 25s · ~38 | 26,496 · 19s · ~36 | 27,812 · 33s · 6 |
-| csv-sum | 22,607 · 11s · 6 | 26,062 · 13s · 6 | 26,867 · 20s · 7 |
-| react-countdown | 44,629 · 208s · ~190 | 26,656 · 21s · ~30 | 28,748 · 49s · 13 |
-| rate-limit | 38,782 · 131s · ~25 | 32,732 · 63s · ~20 | 32,579 · 93s · ~21 |
-| **Total** | **161,955 · 479s · ~293** | **138,410 · 136s · ~117** | **143,588 · 228s · ~53** |
-
-### v1 findings
-
-1. Code minimalism: ponytail dominated (2.2× fewer lines than caveman, 5.5× fewer than baseline).
-2. Total tokens: caveman won by ~4% — ponytail wrote minimal code, then long
- "skipped on purpose" essays. Prose ate the code savings.
-3. Speed: caveman 136s vs ponytail 228s — ponytail deliberated about what not to build.
-4. Floor effect: on already-minimal tasks (csv-sum) both skills pay ~3k tokens
- skill-read tax over baseline.
-
-## Ponytail v2 (after fixes)
-
-v2 changes: Output cap (code + ≤3 short lines, "if the explanation is longer
-than the code, delete the explanation"), ladder-is-a-reflex clause
-(anti-deliberation), ship-and-question rule (never stall on "do you need X?").
-
-| Task | Ponytail v2 | Δ vs v1 | Δ vs caveman |
-|---|---|---|---|
-| email | 26,705 · 21s · 5 loc | −877 tok · −11s | +241 tok · +1s |
-| debounce | 27,185 · 25s · 6 | −627 · −8s | +689 · +6s |
-| csv-sum | 26,278 · 15s · 6 | −589 · −5s | +216 · +2s |
-| react-countdown | 27,598 · 29s · 13 | −1,150 · −20s | +942 · +8s |
-| rate-limit | 28,858 · 48s · 17 | −3,721 · −45s | −3,874 · −15s |
-| **Total** | **136,624 · 158s · 47** | **−6,964 (−4.8%) · −70s (−31%)** | **−1,786 (−1.3%) · +22s** |
-
-## Ponytail v3 (skill file compressed)
-
-v3 change: SKILL.md 115 → 95 lines, same substance — the minimalism skill
-should not be 2× caveman's length. Cuts read cost per invocation and
-injection cost per session.
-
-| Task | Ponytail v3 | Δ vs v2 | Δ vs caveman |
-|---|---|---|---|
-| email | 26,573 · 19s · 5 loc | −132 · −2s | +109 · −1s |
-| debounce | 26,745 · 22s · 5 | −440 · −3s | +249 · +3s |
-| csv-sum | 26,251 · 15s · 6 | −27 · 0s | +189 · +2s |
-| react-countdown | 26,961 · 22s · 13 | −637 · −7s | +305 · +1s |
-| rate-limit | 29,179 · 49s · 18 | +321 · +1s | −3,553 · −14s |
-| **Total** | **135,709 · 127s · 47** | **−915 · −31s (−20%)** | **−2,701 (−2.0%) · −9s (−7%)** |
-
-## Verdict (v3)
-
-| Area | Winner |
-|---|---|
-| Code size | **Ponytail** — 47 vs 117 lines (2.5×) |
-| Deliverable prose | **Ponytail** — capped at 3 skip-lines, under caveman's gotcha lists |
-| Total tokens (cost) | **Ponytail** — 135.7k vs 138.4k (−2.0%) |
-| Wall time | **Ponytail** — 127s vs 136s (−7%; n=1, treat as parity-or-better) |
-| Follow-up prevention | **Ponytail** — every skip names its escalation trigger |
-
-Both skills demolish the no-skill baseline: −16% tokens, ~3× faster, and the
-baseline's degenerate cases (190-line countdown dashboard, 208s) simply don't
-happen. Remaining ~3.6k floor tax vs baseline on trivial tasks is mostly the
-benchmark's explicit SKILL.md read — production sessions get rules injected
-by the SessionStart hook and don't pay it.
diff --git a/.claude/plugins/ponytail/benchmarks/results/2026-06-12-v4-hardening-vs-caveman.md b/.claude/plugins/ponytail/benchmarks/results/2026-06-12-v4-hardening-vs-caveman.md
deleted file mode 100644
index 49f8d8ec..00000000
--- a/.claude/plugins/ponytail/benchmarks/results/2026-06-12-v4-hardening-vs-caveman.md
+++ /dev/null
@@ -1,125 +0,0 @@
-# Ponytail v4 hardening — A–F benchmark vs Caveman (2026-06-12)
-
-Response to the hardening brief in `C:\dev\ponytail-bench\PONYTAIL-BENCHMARK-WRITEUP.md`.
-Harness reused as-is: same 6 tasks (specs reconstructed in `ponytail-bench\specs.md` —
-the originals were not preserved; both new arms got identical text), same scorer
-(`score.py`, arms now auto-discovered), same adversarial probes (`probe_e.py`,
-`probe_f.py`), same extension protocol (phase-1 git commit, cost = `git diff
---numstat` insertions + new-file LOC). Caveman = `JuliusBrussee/caveman` SKILL.md
-verbatim (full level), saved at `ponytail-bench\caveman-SKILL.md`. One fresh
-subagent per task × arm, same model for all 16 runs. Caveat: this model/harness
-differs from the original Cursor runs, so comparisons to the old treatment
-numbers are directional; the ponytail4-vs-caveman head-to-head is same-model.
-
-## v4 changes (the hardening, ~10 lines of prompt total)
-
-1. **Test reflex** (brief 5.1): non-trivial logic leaves ONE runnable check —
- assert-based `demo()`/`__main__` self-check or one small `test_*.py`. No
- frameworks. One-liners need no test.
-2. **Ceiling comments** (5.2): a `ponytail:` shortcut with a known ceiling must
- name the ceiling and the upgrade path in the comment.
-3. **Robust variant rule** (5.3): between two same-size stdlib options, take the
- edge-case-correct one.
-
-Applied to SKILL.md, all five cross-agent rule copies, the hook fallback, and a
-guard line in ponytail-review (never flag the minimal check as bloat).
-
-## Build phase — non-blank LOC / .py files (scorer-verified)
-
-| Task | Control (orig) | Treatment v3 (orig) | **Ponytail v4** | **Caveman** |
-|---|--:|--:|--:|--:|
-| A log CLI | 970 / 13 | 150 / 1 | **145 / 2** | 283 / 1 |
-| B file sync | 587 / 9 | 175 / 2 | **99 / 1** | 228 / 2 |
-| C dispatcher | 726 / 13 | 85 / 1 | **73 / 1** | 396 / 10 |
-| D validation | 343 / 8 | 93 / 1 | **70 / 1** | 218 / 3 |
-| E auth | 155 / 1 | 74 / 1 | **49 / 1** | 148 / 1 |
-| F ledger | 162 / 1 | 86 / 1 | **54 / 1** | 167 / 1 |
-| **Total** | 2943 | 663 | **490** | 1440 |
-
-v4 is at or below v3 on every task (−3% to −43%) **despite now shipping a
-runnable check in all six arms** — the test reflex did not cause bloat creep.
-v4 is 34% of Caveman's size. Task A is the one place Caveman has fewer .py
-files (1 vs 2): v4's second file is the 24-line regression check Caveman
-doesn't ship — deleting it to win file count would sacrifice the safety clause
-to win on size, which the brief forbids.
-
-## Extension phase (tasks C, D — surprise requests, git-measured)
-
-| Metric | C v4 | C caveman | D v4 | D caveman |
-|---|--:|--:|--:|--:|
-| Lines changed (insertions + new-file LOC) | **41** | 156 | **55** | 257 |
-| Files touched | 1 | 7 | 1 | 3 |
-| Still correct after | yes | yes | yes | yes |
-
-v4 honored the requested seams (duck-typed registry in C, `@rule` registry in
-D) and extended 74–79% cheaper. Both arms' extended demos re-run exit 0.
-
-## Safety — adversarial probes (independently executed)
-
-| Probe | v4 | caveman |
-|---|--:|--:|
-| Security, task E (8 checks) | **8/8** | 8/8 |
-| Concurrency, task F (6 checks) | **6/6** | 6/6 |
-
-No regression from the added rules. v4's E chose PBKDF2-HMAC-SHA256 (600k
-iters) + 16-byte `secrets` salt + `hmac.compare_digest` + `token_urlsafe(32)`;
-F kept integer cents + a global lock with the ceiling comment naming the
-per-account-lock upgrade (5.2 working as designed; Caveman built per-account
-locks at 3× the LOC).
-
-## Correctness
-
-19/19 independent re-runs exit 0 (14 build demos/tests + 5 post-extension).
-
-## Acceptance criteria (brief §5.6)
-
-1. Probes 100% — **pass** (8/8 + 6/6).
-2. Every treatment arm ships a runnable check — **pass** (A: `test_loganalyze.py`;
- B–F: assert-based `__main__` checks; all executed). This was the #1 gap (was 1/4).
-3. LOC within ~20% of v3 treatment numbers — **pass on intent**: every arm at or
- below v3 (A −3%, C −14%; B/D/E/F 25–43% *below* — leaner, not bloated).
-4. Ceiling-bearing `ponytail:` comments name upgrade paths — **pass**, verified
- per arm: global lock→per-account locks (F), no token TTL→add TTL (E),
- sequential sends→async/threaded + hardcoded route→routing table (C),
- special-cased `unique`→DATASET_RULES registry (D), observed-hours stats→
- impute full range (A), no empty-dir handling→dir pass (B).
-5. Head-to-head vs Caveman — **pass**: ≥ on every axis, strictly better on three.
- - Safety: tie at 100% (≥, never regressed to win on size).
- - Size: LOC strictly better 6/6; files ≤ on 5/6 (A caveat above).
- - Extension cost: strictly better on both tasks.
- - Reviewability: strictly better — every v4 simplification is `ponytail:`-marked
- with its ceiling; Caveman's code marks only spec-allowed simulated transports,
- and its design trade-offs live in the chat report, invisible to a later reviewer.
-
-## Addendum: same-model control arm (control2, added same day)
-
-The control numbers above were inherited from the original Cursor harness,
-which could not expose token counts. Six fresh `task*-control2` arms were run
-through this harness (no skill, "build production-normal", same model, same
-specs), making all three arms same-model. Control2 passes both probes (8/8,
-6/6) and all 10 demo/test runs exit 0; extensions on C and D re-verified.
-
-| Whole benchmark (6 builds + C/D extensions) | Control2 | Caveman | Ponytail v4 |
-|---|--:|--:|--:|
-| Build LOC | 3,629 | 1,440 | **490** |
-| Build LOC per task (A-F) | 946/656/808/677/260/282 | 283/228/396/218/148/167 | **145/99/73/70/49/54** |
-| Extension lines changed (C, D) | 378, 737 | 156, 257 | **41, 55** |
-| Agent tokens, total | 430,697 | 290,546 | **229,370 (-47% vs control2)** |
-| Agent wall time, total | 2,749s | 1,596s | **821s (3.3x)** |
-| Probes | 8/8 + 6/6 | 8/8 + 6/6 | 8/8 + 6/6 |
-
-Wall times carry parallel-scheduling noise (arms ran concurrently, n=1 per
-cell); token counts are exact from agent telemetry. The README "Numbers"
-section now cites this same-model dataset and retires the older 5-task v3
-figures (still recorded in `2026-06-12-caveman-vs-ponytail.md`).
-
-## Residual (honest notes)
-
-- A's spike stats still use observed-hours-only mean+3σ rather than a
- leave-one-out/imputed baseline (Caveman zero-filled the hour range). The 5.3
- rule softened but did not eliminate the naive-algorithm tendency; the choice
- is now at least documented with its upgrade path (5.2). Candidate for a
- future eval if it bites in practice.
-- Caveman is a prose-compression skill that explicitly writes code "normal" —
- it loses on code size by design. The meaningful result is that adding the
- test reflex did not erode ponytail's size advantage or its 100% probe record.
diff --git a/.claude/plugins/ponytail/benchmarks/results/2026-06-15-llama3.2-local.md b/.claude/plugins/ponytail/benchmarks/results/2026-06-15-llama3.2-local.md
deleted file mode 100644
index 55ed4e08..00000000
--- a/.claude/plugins/ponytail/benchmarks/results/2026-06-15-llama3.2-local.md
+++ /dev/null
@@ -1,76 +0,0 @@
-# Local model benchmark: llama3.2 via Ollama — 2026-06-15
-
-Same 5 tasks as the Claude benchmark, same three arms (baseline / caveman / ponytail),
-run against a local **llama3.2:latest** (3.2B, Q4_K_M) via Ollama on a Windows 11 machine.
-Tooling: `benchmarks/benchmark-local.py` (no promptfoo needed).
-
-> **Updated 2026-06-15:** the LOC counter now counts bare, unfenced code. It
-> previously counted only fenced code blocks and scored everything else as 0,
-> which silently deflated any arm whose output happened to skip the fences (small
-> models do this often). Numbers below use the corrected counter at n=5 median.
-> Absolute times reflect this machine (GPU-accelerated); compare arms within a
-> run, not against an earlier CPU-bound machine.
-
-## Results (n=5, median)
-
-**Code LOC**
-
-| arm | email | debounce | csv-sum | countdown | rate-limit | **TOTAL** |
-|---|--:|--:|--:|--:|--:|--:|
-| baseline | 16 | 18 | 22 | 37 | 16 | **109** |
-| caveman | 16 | 21 | 18 | 46 | 32 | **133** |
-| ponytail | 17 | 22 | 18 | 52 | 28 | **137** |
-
-**Time (seconds)**
-
-| arm | email | debounce | csv-sum | countdown | rate-limit | **TOTAL** |
-|---|--:|--:|--:|--:|--:|--:|
-| baseline | 3.1 | 3.7 | 3.6 | 4.2 | 4.8 | **19.4** |
-| caveman | 4.1 | 4.2 | 3.6 | 4.4 | 4.8 | **21.1** |
-| ponytail | 4.1 | 4.2 | 3.8 | 4.8 | 4.9 | **21.8** |
-
-## Key findings
-
-**On llama3.2 the LOC effect is inside the noise floor.** At temperature 0.7 the
-per-run totals swing hard: across the five runs, ponytail landed anywhere from
-17% *below* baseline to 50% *above* it. The n=5 median came out +26%; a separate
-n=3 median came out −17%. The aggregate itself flips sign depending on the
-sample, and the countdown task alone ranged 19 to 74 LOC on baseline. There is no
-stable LOC reduction to report.
-
-**Ponytail does not transfer to llama3.2.** The 80-94% LOC reduction seen on
-Claude is simply absent: the signal is lost in run-to-run variance. The one
-consistent effect is on time, and it goes the wrong way: ponytail is ~10-15%
-*slower* than baseline (more system-prompt tokens to process), never the 3-6x
-speedup seen on Claude.
-
-**Why:** ponytail is a prompt-engineering skill calibrated on Claude models,
-which are trained to follow detailed system instructions. A 3.2B quantised model
-absorbs the rules only partially and adds prose justifying its choices, paying
-the instruction-following cost without reliably converting it into less code.
-
-## Reproduce
-
-Install Ollama and pull a model, then run from the repo root:
-
-```bash
-ollama pull llama3.2
-python benchmarks/benchmark-local.py --model llama3.2 --repeat 5
-```
-
-At this model size the LOC signal is noisy; raise `--repeat` (or lower the
-sampling temperature in the script) before reading anything into the totals.
-
-Optional flags:
-
-```
---repeat N Runs per cell; median is reported (default: 1)
---ollama-url URL Ollama base URL (default: http://localhost:11434)
-```
-
-## Takeaway
-
-The benchmark claims in the README are accurate for the models tested (Haiku,
-Sonnet, Opus). For local/small models, expect the gains to shrink into the noise
-until instruction-following reaches a threshold comparable to Claude Haiku or
-better.
diff --git a/.claude/plugins/ponytail/benchmarks/results/2026-06-16-correctness-gate-fix.md b/.claude/plugins/ponytail/benchmarks/results/2026-06-16-correctness-gate-fix.md
deleted file mode 100644
index 7fa12dbd..00000000
--- a/.claude/plugins/ponytail/benchmarks/results/2026-06-16-correctness-gate-fix.md
+++ /dev/null
@@ -1,107 +0,0 @@
-# Correctness under Ponytail: gate fixes + GPT-mini reproduction (2026-06-16)
-
-Context: [issue #65](https://github.com/DietrichGebert/ponytail/issues/65) asked whether
-Ponytail degrades model performance. A community run (Pyseph) reported a large correctness
-drop on `gpt-4.1-mini` (10/15 with Ponytail vs 15/15 without) and a small one on
-`gpt-5.4-mini` (14/15 vs 15/15).
-
-Investigating that, the correctness gate itself turned out to be the main culprit. This
-writeup documents the gate bugs, the fixes, and a clean reproduction of Pyseph's exact
-model setup.
-
-## TL;DR
-
-- The `correct` gate had two bugs that **under-reported correctness for terse models** — it
- could not read unfenced code, and the debounce task tested for a deliverable the prompt
- never asked for.
-- After fixing the gate, on a clean `n=20` run of Pyseph's exact models, the large drop
- **does not reproduce**: `gpt-4.1-mini` is 100% with *and* without Ponytail.
-- Ponytail roughly **halves** median code size, the original headline claim, with no
- meaningful correctness cost on instruction-following models.
-- One genuine, small Ponytail defect surfaced and is reported honestly below.
-
-## The gate bugs
-
-1. **Unfenced code was scored as "no code blocks."** `extractBlocks()` only matched
- ```` ```fenced``` ```` blocks. Models that reply with bare code (more common under
- Ponytail's terse style, and frequent on `gpt-5.4-mini`) scored an automatic fail even
- when the code was correct. This alone accounted for 41 of 74 failures in the first GPT run.
-2. **The debounce task tested the wrong deliverable.** The prompt said *"add debounce to a
- search input"* but the check expected a reusable `debounce(fn, delay)` utility it could
- call. A correct inline answer (`input.addEventListener(... clearTimeout ...)`) failed with
- `searchInput is not defined`. This accounted for 31 of 74 failures, and it penalized the
- literal, minimal answer while rewarding code that over-built a utility nobody asked for.
-
-Both are fixed: `extractBlocks()` now falls back to treating the whole response as one code
-block when no fence is present (and tolerates CRLF), and the debounce task now asks for the
-reusable `debounce(fn, delay)` function the check actually verifies.
-
-## Method
-
-Two arms (baseline = no skill, ponytail), Pyseph's two models, the five repo tasks, `n=20`
-per cell, run serially (`--max-concurrency 1`) so transient quota 429s never reduced the
-denominators. Code is executed where possible (email, debounce, CSV); React/FastAPI are
-structural checks (see the README caveat). Claude numbers are a free re-score of the
-committed `output-10x.json` responses through the fixed gate (`n=10`, 4 tasks — the saved
-debounce responses predate the prompt fix and are excluded).
-
-## Results
-
-### GPT-mini (clean `n=20`, 0 errors, full denominators)
-
-| model | baseline | ponytail | median LOC (base → pony) |
-|---|--:|--:|--:|
-| gpt-4.1-mini | 100/100 | 100/100 | 15 → 7 |
-| gpt-5.4-mini | 100/100 | 98/100 | 16 → 7 |
-
-Pyseph's reported `gpt-4.1-mini` drop (10/15 ≈ 67%) does not reproduce — it scores 100% here.
-The difference is the gate fixes; the original numbers were measuring unfenced code and the
-debounce deliverable mismatch, not model degradation.
-
-### Claude (fixed gate, re-score of committed responses, `n=10`, 4 tasks)
-
-| model | baseline | ponytail |
-|---|--:|--:|
-| claude-haiku-4-5 | 38/40 (95%) | 40/40 (100%) |
-| claude-opus-4-8 | 40/40 (100%) | 40/40 (100%) |
-| claude-sonnet-4-6 | 28/40 (70%) | 40/40 (100%) |
-
-On instruction-following models Ponytail ties or slightly *beats* baseline. The low
-`sonnet` baseline number is itself an over-engineering failure: the unconstrained validator
-returns a rich `{is_valid, message}` dict instead of a bool, so `if validate_email(addr)` is
-always truthy and accepts every address — a real bug Ponytail's `return bool(...)` avoids.
-
-## The one real Ponytail defect
-
-On `gpt-5.4-mini`, 2 of 20 Ponytail email runs failed because the model reached for the
-laziest stdlib option:
-
-```python
-from email.utils import parseaddr
-def is_valid_email(email):
- _, addr = parseaddr(email)
- return addr == email and "@" in addr # accepts "@missing-local.com"
-```
-
-`parseaddr` does not require a local part, so `"@missing-local.com"` is accepted. This is a
-genuine (if minor) cost of pushing toward one-liners: occasionally the chosen stdlib helper
-has an edge-case hole. The other 18 runs used a regex and passed.
-
-## Reproduce
-
-```bash
-# GPT arms (needs OPENAI_API_KEY in ../.env)
-cd benchmarks
-npx promptfoo@latest eval -c promptfooconfig.gpt.yaml --env-file ../.env --repeat 20 --max-concurrency 1
-
-# Claude re-score of committed responses through the fixed gate
-node -e 'const c=require("./correctness.js"),d=require("./output-10x.json");/* score d.results.results through c */'
-```
-
-## Takeaway
-
-The "Ponytail hurts correctness" reports trace to a benchmark that could not read terse
-output, not to the skill. With the gate fixed, the LOC win holds and correctness is flat on
-capable models. The honest caveats remain: the effect is model-dependent (small/local models
-follow the ladder poorly — see the llama3.2 writeup), and chasing the shortest answer can
-occasionally pick a stdlib helper with an edge-case gap.
diff --git a/.claude/plugins/ponytail/benchmarks/results/2026-06-16-robustness-audit.md b/.claude/plugins/ponytail/benchmarks/results/2026-06-16-robustness-audit.md
deleted file mode 100644
index c30bf73a..00000000
--- a/.claude/plugins/ponytail/benchmarks/results/2026-06-16-robustness-audit.md
+++ /dev/null
@@ -1,129 +0,0 @@
-# Robustness audit: does ponytail degrade weak models? (2026-06-16)
-
-Follow-up to [issue #65](https://github.com/DietrichGebert/ponytail/issues/65). After fixing
-the correctness-gate bugs, the open question was the real one: does Ponytail's push toward
-the shortest solution make weak models produce *wrong* code on edge cases? This audit
-answers it directly, with a deliberately hostile test set and high sample counts.
-
-## TL;DR
-
-- Across **12 classic edge-case traps** (off-by-one, n=0, leap-century, subtractive Roman,
- deep nesting, …) on **two weak models** (`gpt-4.1-mini`, `gpt-5.4-mini`), Ponytail holds
- **baseline parity** — it does not produce more wrong answers than the unconstrained model.
-- The **one** measured soft spot is email validation, and it is **provider-specific**.
- OpenAI models, at every size, sometimes reach for `email.utils.parseaddr` (a parser, not a
- validator) under "stdlib-first" pressure and accept `"@missing-local.com"`. On Claude,
- ponytail's target platform, email is **100%** (haiku/sonnet/opus, n=40 each).
-- The slip is **not fixable by skill text**: 8 distinct SKILL.md edits (including an n=100
- A/B, 96% → 95%) all scored ≤ the current skill, several worse, all bloating LOC. Counter-
- instructions make small models overthink and fail *more*. Nothing was shipped — adding
- skill text that doesn't move the number is exactly the cargo-cult Ponytail exists to avoid.
-
-## Method
-
-`baseline` (no skill) vs `ponytail` (full SKILL.md), single-shot, default params,
-`gpt-4.1-mini` and `gpt-5.4-mini`. Each task runs generated code against edge-case
-assertions. Every check is **self-verified**: a known-correct and a known-lazy-wrong
-reference must pass/fail respectively before any model output is scored
-(`node robustness-audit.js --selftest`, 16/16). Runs were serial to avoid quota 429s
-shrinking denominators.
-
-## Edge-case traps (n=20/cell)
-
-All 12 algorithmic tasks: `baseline 20/20 == ponytail 20/20` on **both** models. Examples
-of the traps (the lazy version passes the common case, fails the edge):
-
-| task | the trap a lazy impl misses |
-|---|---|
-| is_prime | n = 0, 1, negatives |
-| factorial / fibonacci | n = 0 |
-| binary_search | empty list, target at the last index (off-by-one) |
-| is_leap_year / days_in_month | 1900 not leap, 2000 leap (century rule) |
-| int_to_roman | subtractive forms (4=IV, 9=IX, 40=XL) |
-| flatten | nesting deeper than one level |
-| clamp | value already in range |
-| chunk | trailing remainder |
-
-The only sub-20 cell in the first run was `gpt-5.4-mini` flatten at 19/20 — a single
-stochastic miss that **did not reproduce**: 50/50 at n=50. (`clamp` showed 19/19, i.e. one
-API error, not a wrong answer.)
-
-## Validators: the email slip is provider-specific
-
-The one place ponytail measurably affects correctness is **email validation**, via the
-parse ≠ validate trap: under "stdlib-first" pressure a model reaches for
-`email.utils.parseaddr` — a *parser* that accepts malformed input like `@missing-local.com`
-— instead of writing an explicit check. The split is by **provider**, not model size.
-
-**OpenAI (email, baseline vs ponytail, n=50–100):**
-
-| model | baseline | ponytail |
-|---|--:|--:|
-| gpt-4.1-mini | 100% | 98% |
-| gpt-4.1 | 100% | 79% |
-| gpt-5.4-mini | ~100% | ~92% |
-| gpt-5.4 | 100% | 98% |
-| gpt-5.5 | 98% | 94% |
-
-**Claude (email, baseline vs ponytail, n=40):**
-
-| model | baseline | ponytail |
-|---|--:|--:|
-| claude-haiku-4-5 | 35/40 | **40/40** |
-| claude-sonnet-4-6 | 0/40 * | **40/40** |
-| claude-opus-4-8 | 39/40 | **40/40** |
-
-Every OpenAI model slips regardless of size (gpt-4.1 full is the worst). Every Claude model
-is **100%** under ponytail.
-
-\* The Sonnet baseline `0/40` is a return-type artifact, not a logic failure, and should not
-be read as "Sonnet cannot validate email." Unconstrained Sonnet over-engineers the validator
-into a `dict` (`{is_valid, message}`) instead of a bool. The test calls the function as a
-bool, and a non-empty dict is always truthy, so it "accepts" every address and scores 0.
-Read dict-aware (via `is_valid`), its logic is about 75% correct (9/12). The honest point is
-narrow: ponytail writes the plain correct bool the task implies, while the unconstrained
-model over-builds the interface and trips a naive `if validate(x)` caller. `url`,
-`creditcard`, and `ipv4` hold at ~100% under ponytail on both providers, because their lazy
-stdlib choice (`ipaddress`, Luhn, scheme checks) is already strict. Only email's obvious
-stdlib tool is a parser.
-
-## The fix that wasn't
-
-SKILL.md already says "never simplify away input validation" and "pick the stdlib option
-correct on edge cases." We tried hard to push the OpenAI rate to 100% by editing the skill —
-**8 distinct edits** across counter-pressure wording, a check-mandate, explicit-over-delegate,
-a few-shot example, combinations, and three placements. Every one scored ≤ the current skill;
-several were far worse (one cratered to 78%); all bloated median LOC. The definitive n=100
-A/B of the most promising edit:
-
-```
-OLD skill: 96/100 (96.0%)
-NEW skill: 95/100 (95.0%) -> within noise, no reliable effect
-```
-
-Counter-instructions backfire: piling validation rules onto the skill makes models overthink
-and produce *more* broken validators, not fewer. The reflex to reach for `parseaddr` lives in
-the OpenAI models' training, and no skill wording reliably overrides it — so nothing was
-shipped. Adding skill text that doesn't work is the cargo-cult Ponytail exists to prevent.
-
-## Conclusion
-
-"Ponytail degrades model performance" is not supported. Across 12 edge-case traps, ponytail
-holds baseline parity. On validation it is **100% on every Claude model**, which is its
-target platform. The only blemish is an email-validator slip on OpenAI models (a
-cross-provider `parseaddr` reflex, present at every size), documented here and not fixable by
-skill text. The LOC win (about half the code) comes with no correctness tax on Claude.
-
-## Reproduce
-
-```bash
-cd benchmarks
-node robustness-audit.js --selftest # verify all 16 instruments (no API)
-node robustness-audit.js # 16-task audit, gpt-5.4-mini, n=20
-AUDIT_MODEL=gpt-4.1-mini node robustness-audit.js
-
-# email cross-provider (the slip)
-ME_MODELS="gpt-4.1,gpt-5.4,gpt-5.5" ME_N=50 node model-email.js # OpenAI (OPENAI_API_KEY)
-node claude-email.js # Claude (ANTHROPIC_API_KEY)
-```
-`OPENAI_API_KEY` / `ANTHROPIC_API_KEY` read from `../.env`.
diff --git a/.claude/plugins/ponytail/benchmarks/robustness-audit.js b/.claude/plugins/ponytail/benchmarks/robustness-audit.js
deleted file mode 100644
index bf3f0453..00000000
--- a/.claude/plugins/ponytail/benchmarks/robustness-audit.js
+++ /dev/null
@@ -1,465 +0,0 @@
-// Robustness audit (issue #65 follow-up): find where ponytail actually breaks on a
-// weak model. 12 tasks with classic edge-case traps. Each has a known-good and a
-// known-lazy-wrong reference so the instrument is verified before any API spend.
-// node robustness-audit.js --selftest # no API: prove every check is correct
-// node robustness-audit.js # baseline vs ponytail, gpt-5.4-mini, n=20
-const { execSync } = require("child_process");
-const fs = require("fs");
-const os = require("os");
-const path = require("path");
-
-const N = Number(process.env.AUDIT_N) || 20;
-const MODEL = process.env.AUDIT_MODEL || "gpt-5.4-mini";
-const ROOT = path.join(__dirname, "..");
-let kv = {};
-try {
- kv = Object.fromEntries(
- fs
- .readFileSync(path.join(ROOT, ".env"), "utf8")
- .split(/\r?\n/)
- .filter((l) => l.includes("=") && !l.trim().startsWith("#"))
- .map((l) => {
- const i = l.indexOf("=");
- return [l.slice(0, i).trim(), l.slice(i + 1).trim()];
- }),
- );
-} catch (_) {
- /* no .env — fine for --selftest */
-}
-const KEY = process.env.OPENAI_API_KEY || kv.OPENAI_API_KEY;
-const SKILL = fs.readFileSync(
- path.join(ROOT, "skills", "ponytail", "SKILL.md"),
- "utf8",
-);
-
-// task = { name, prompt, names, arity, cases: [[argsArray, expected], ...], good, bad }
-const TASKS = [
- {
- name: "is_prime",
- arity: 1,
- names: ["is_prime", "isprime", "prime"],
- prompt:
- "Write a Python function is_prime(n) that returns True if n is prime, else False.",
- cases: [
- [[2], true],
- [[1], false],
- [[0], false],
- [[-7], false],
- [[17], true],
- [[15], false],
- [[97], true],
- ],
- good: "def is_prime(n):\n if n < 2: return False\n for i in range(2, int(n**0.5)+1):\n if n % i == 0: return False\n return True",
- bad: "def is_prime(n):\n for i in range(2, n):\n if n % i == 0: return False\n return True",
- },
- {
- name: "factorial",
- arity: 1,
- names: ["factorial", "fact"],
- prompt: "Write a Python function factorial(n).",
- cases: [
- [[0], 1],
- [[1], 1],
- [[5], 120],
- [[6], 720],
- ],
- good: "def factorial(n):\n r = 1\n for i in range(2, n+1): r *= i\n return r",
- bad: "def factorial(n):\n r = 1\n for i in range(1, n): r *= i\n return r",
- },
- {
- name: "fibonacci",
- arity: 1,
- names: ["fibonacci", "fib"],
- prompt:
- "Write fibonacci(n) returning the nth Fibonacci number, with fib(0)=0 and fib(1)=1.",
- cases: [
- [[0], 0],
- [[1], 1],
- [[2], 1],
- [[7], 13],
- [[10], 55],
- ],
- good: "def fibonacci(n):\n a, b = 0, 1\n for _ in range(n): a, b = b, a+b\n return a",
- bad: "def fibonacci(n):\n a, b = 1, 1\n for _ in range(n): a, b = b, a+b\n return a",
- },
- {
- name: "gcd",
- arity: 2,
- names: ["gcd"],
- prompt: "Write gcd(a, b) returning the greatest common divisor.",
- cases: [
- [[12, 8], 4],
- [[5, 0], 5],
- [[0, 5], 5],
- [[17, 5], 1],
- [[100, 75], 25],
- ],
- good: "def gcd(a, b):\n while b: a, b = b, a % b\n return a",
- bad: "def gcd(a, b):\n for i in range(min(a, b), 0, -1):\n if a % i == 0 and b % i == 0: return i",
- },
- {
- name: "binary_search",
- arity: 2,
- names: ["binary_search", "bsearch", "search"],
- prompt:
- "Write binary_search(arr, target) returning the index of target in the sorted list arr, or -1 if absent.",
- cases: [
- [[[1, 2, 3, 4, 5], 3], 2],
- [[[1, 2, 3, 4, 5], 1], 0],
- [[[1, 2, 3, 4, 5], 5], 4],
- [[[1, 2, 3, 4, 5], 6], -1],
- [[[], 1], -1],
- [[[1], 1], 0],
- ],
- good: "def binary_search(arr, target):\n lo, hi = 0, len(arr)-1\n while lo <= hi:\n m = (lo+hi)//2\n if arr[m] == target: return m\n elif arr[m] < target: lo = m+1\n else: hi = m-1\n return -1",
- bad: "def binary_search(arr, target):\n lo, hi = 0, len(arr)-1\n while lo < hi:\n m = (lo+hi)//2\n if arr[m] == target: return m\n elif arr[m] < target: lo = m+1\n else: hi = m-1\n return -1",
- },
- {
- name: "is_leap_year",
- arity: 1,
- names: ["is_leap_year", "is_leap", "leap"],
- prompt: "Write is_leap_year(year) returning True if it is a leap year.",
- cases: [
- [[2000], true],
- [[1900], false],
- [[2020], true],
- [[2021], false],
- [[2400], true],
- [[2100], false],
- ],
- good: "def is_leap_year(y):\n return y % 4 == 0 and (y % 100 != 0 or y % 400 == 0)",
- bad: "def is_leap_year(y):\n return y % 4 == 0",
- },
- {
- name: "days_in_month",
- arity: 2,
- names: ["days_in_month"],
- prompt:
- "Write days_in_month(year, month) returning the number of days in that month.",
- cases: [
- [[2020, 2], 29],
- [[2021, 2], 28],
- [[1900, 2], 28],
- [[2000, 2], 29],
- [[2021, 4], 30],
- [[2021, 1], 31],
- [[2021, 12], 31],
- ],
- good: "import calendar\ndef days_in_month(year, month):\n return calendar.monthrange(year, month)[1]",
- bad: "def days_in_month(year, month):\n return [31,28,31,30,31,30,31,31,30,31,30,31][month-1]",
- },
- {
- name: "int_to_roman",
- arity: 1,
- names: ["int_to_roman", "to_roman", "roman"],
- prompt:
- "Write int_to_roman(n) converting an integer (1-3999) to its Roman numeral string.",
- cases: [
- [[4], "IV"],
- [[9], "IX"],
- [[58], "LVIII"],
- [[1994], "MCMXCIV"],
- [[40], "XL"],
- [[3], "III"],
- ],
- good: "def int_to_roman(n):\n vals=[(1000,'M'),(900,'CM'),(500,'D'),(400,'CD'),(100,'C'),(90,'XC'),(50,'L'),(40,'XL'),(10,'X'),(9,'IX'),(5,'V'),(4,'IV'),(1,'I')]\n r=''\n for v,s in vals:\n while n>=v: r+=s; n-=v\n return r",
- bad: "def int_to_roman(n):\n vals=[(1000,'M'),(500,'D'),(100,'C'),(50,'L'),(10,'X'),(5,'V'),(1,'I')]\n r=''\n for v,s in vals:\n while n>=v: r+=s; n-=v\n return r",
- },
- {
- name: "flatten",
- arity: 1,
- names: ["flatten"],
- prompt:
- "Write flatten(lst) that fully flattens an arbitrarily nested list of integers into a flat list.",
- cases: [
- [[[1, [2, [3, 4]], 5]], [1, 2, 3, 4, 5]],
- [[[]], []],
- [[[1, 2, 3]], [1, 2, 3]],
- [[[1, [2], [[3]]]], [1, 2, 3]],
- ],
- good: "def flatten(lst):\n out = []\n for x in lst:\n if isinstance(x, list): out.extend(flatten(x))\n else: out.append(x)\n return out",
- bad: "def flatten(lst):\n return [x for s in lst for x in (s if isinstance(s, list) else [s])]",
- },
- {
- name: "chunk",
- arity: 2,
- names: ["chunk"],
- prompt:
- "Write chunk(lst, size) splitting lst into consecutive sublists of length size (the last may be shorter).",
- cases: [
- [
- [[1, 2, 3, 4, 5], 2],
- [[1, 2], [3, 4], [5]],
- ],
- [
- [[1, 2, 3, 4], 2],
- [
- [1, 2],
- [3, 4],
- ],
- ],
- [[[], 3], []],
- [[[1], 5], [[1]]],
- ],
- good: "def chunk(lst, size):\n return [lst[i:i+size] for i in range(0, len(lst), size)]",
- bad: "def chunk(lst, size):\n return [lst[i:i+size] for i in range(0, len(lst)-size+1, size)]",
- },
- {
- name: "clamp",
- arity: 3,
- names: ["clamp"],
- prompt:
- "Write clamp(value, low, high) returning value bounded to the range [low, high].",
- cases: [
- [[5, 0, 10], 5],
- [[-1, 0, 10], 0],
- [[15, 0, 10], 10],
- [[0, 0, 10], 0],
- [[10, 0, 10], 10],
- ],
- good: "def clamp(value, low, high):\n return max(low, min(value, high))",
- bad: "def clamp(value, low, high):\n if value < low: return low\n if value > high: return high",
- },
- {
- name: "is_palindrome",
- arity: 1,
- names: ["is_palindrome", "palindrome", "is_pal"],
- prompt:
- "Write is_palindrome(s) returning True if s is a palindrome, ignoring case, spaces, and punctuation.",
- cases: [
- [["racecar"], true],
- [["A man, a plan, a canal: Panama"], true],
- [["hello"], false],
- [[""], true],
- [["No 'x' in Nixon"], true],
- [["ab"], false],
- ],
- good: "def is_palindrome(s):\n c = [ch.lower() for ch in s if ch.isalnum()]\n return c == c[::-1]",
- bad: "def is_palindrome(s):\n return s == s[::-1]",
- },
- // Validators: the parse != validate trap. email is ponytail's one measured soft spot
- // on gpt-5.4-mini (~4-5%, parseaddr); the rest hold parity. See results writeup.
- {
- name: "email",
- arity: 1,
- names: [
- "validate_email",
- "is_valid_email",
- "email_validator",
- "is_valid",
- "validate",
- ],
- prompt: "Write me a Python function that validates email addresses.",
- cases: [
- [["[email protected]"], true],
- [["[email protected]"], true],
- [["no-at-sign"], false],
- [[""], false],
- [["@missing-local.com"], false],
- ],
- good: 'import re\ndef validate_email(e):\n return bool(re.match(r"^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$", e))',
- bad: 'from email.utils import parseaddr\ndef validate_email(e):\n _, a = parseaddr(e)\n return a == e and "@" in a',
- },
- {
- name: "url",
- arity: 1,
- names: ["validate_url", "is_valid_url", "is_url", "validate", "is_valid"],
- prompt:
- "Write a Python function that validates whether a string is a valid HTTP or HTTPS URL.",
- cases: [
- [["https://example.com"], true],
- [["http://a.b/c"], true],
- [["https://x.io/p?q=1"], true],
- [["garbage"], false],
- [[""], false],
- [["example.com"], false],
- [["ftp://example.com"], false],
- [["http://"], false],
- ],
- good: 'from urllib.parse import urlparse\ndef validate_url(u):\n p = urlparse(u)\n return p.scheme in ("http","https") and bool(p.netloc)',
- bad: "from urllib.parse import urlparse\ndef validate_url(u):\n return bool(urlparse(u))",
- },
- {
- name: "creditcard",
- arity: 1,
- names: [
- "validate_credit_card",
- "is_valid_card",
- "validate_card",
- "luhn",
- "validate",
- "is_valid",
- ],
- prompt: "Write a Python function that validates a credit card number.",
- cases: [
- [["4242424242424242"], true],
- [["4012888888881881"], true],
- [["4242424242424241"], false],
- [["12345"], false],
- [["abcd"], false],
- ],
- good: "def validate_credit_card(n):\n d=[int(c) for c in str(n) if c.isdigit()]\n if len(d)<13: return False\n s=0\n for i,x in enumerate(reversed(d)):\n if i%2==1:\n x*=2\n if x>9: x-=9\n s+=x\n return s%10==0",
- bad: "def validate_credit_card(n):\n s=str(n).replace(' ','')\n return s.isdigit() and len(s)==16",
- },
- {
- name: "ipv4",
- arity: 1,
- names: [
- "validate_ipv4",
- "is_valid_ip",
- "is_ipv4",
- "validate_ip",
- "validate",
- "is_valid",
- ],
- prompt: "Write a Python function that validates an IPv4 address.",
- cases: [
- [["192.168.1.1"], true],
- [["0.0.0.0"], true],
- [["255.255.255.255"], true],
- [["999.999.999.999"], false],
- [["256.1.1.1"], false],
- [["1.2.3"], false],
- [["abc"], false],
- ],
- good: "import ipaddress\ndef validate_ipv4(s):\n try:\n ipaddress.IPv4Address(s); return True\n except Exception: return False",
- bad: "import re\ndef validate_ipv4(s):\n return bool(re.match(r'^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$', s))",
- },
-];
-
-function pyBlock(text) {
- const m = [...String(text || "").matchAll(/```(\w*)\r?\n([\s\S]*?)```/g)];
- if (!m.length) return text || "";
- const py = m.find((x) => /py/.test(x[1]));
- return (py || m[0])[2];
-}
-
-function checkPy(code, task) {
- const harness = `import sys, json, inspect
-${code}
-TARGET = ${task.arity}
-names = json.loads(r'''${JSON.stringify(task.names)}''')
-fn = None
-for nm in names:
- if nm in dir() and callable(eval(nm)): fn = eval(nm); break
-if fn is None:
- for nm, obj in list(globals().items()):
- if callable(obj) and not nm.startswith('_') and not inspect.isclass(obj):
- try:
- if len(inspect.signature(obj).parameters) == TARGET: fn = obj; break
- except (ValueError, TypeError): pass
-if fn is None: print('NOFN'); sys.exit(1)
-cases = json.loads(r'''${JSON.stringify(task.cases)}''')
-for args, expected in cases:
- try: r = fn(*args)
- except Exception as e: print('EXC', args, e); sys.exit(1)
- if r != expected: print('MISMATCH', args, '->', r, 'want', expected); sys.exit(1)
-print('PASS')`;
- const f = path.join(
- os.tmpdir(),
- `audit-${process.pid}-${Math.random().toString(36).slice(2)}.py`,
- );
- fs.writeFileSync(f, harness);
- try {
- execSync(`python3 "${f}"`, {
- timeout: 10000,
- encoding: "utf8",
- stdio: "pipe",
- });
- return true;
- } catch (e) {
- return false;
- } finally {
- try {
- fs.unlinkSync(f);
- } catch (_) {}
- }
-}
-
-async function call(system, user) {
- const body = {
- model: MODEL,
- max_completion_tokens: 4096,
- messages: system
- ? [
- { role: "system", content: system },
- { role: "user", content: user },
- ]
- : [{ role: "user", content: user }],
- };
- const r = await fetch("https://api.openai.com/v1/chat/completions", {
- method: "POST",
- headers: {
- Authorization: "Bearer " + KEY,
- "Content-Type": "application/json",
- },
- body: JSON.stringify(body),
- });
- if (!r.ok) return { err: r.status };
- const j = await r.json();
- return { text: j.choices?.[0]?.message?.content || "" };
-}
-
-module.exports = { checkPy, pyBlock, call, TASKS, SKILL };
-if (require.main !== module) return;
-
-if (process.argv.includes("--selftest")) {
- let ok = 0,
- bad = 0;
- for (const t of TASKS) {
- const g = checkPy(t.good, t),
- b = checkPy(t.bad, t);
- const pass = g === true && b === false;
- console.log(
- `${pass ? "ok " : "XX "} ${t.name.padEnd(16)} good=${g} bad=${b}`,
- );
- pass ? ok++ : bad++;
- }
- console.log(
- `\nself-test: ${ok}/${TASKS.length} instruments valid${bad ? ` — ${bad} BROKEN` : ""}`,
- );
- process.exit(bad ? 1 : 0);
-}
-
-(async () => {
- const arms = { baseline: null, ponytail: SKILL };
- const grid = {};
- for (const t of TASKS) {
- grid[t.name] = {};
- for (const arm of Object.keys(arms)) {
- let pass = 0,
- err = 0;
- for (let i = 0; i < N; i++) {
- const res = await call(arms[arm], t.prompt);
- if (res.err) {
- err++;
- continue;
- }
- if (checkPy(pyBlock(res.text), t)) pass++;
- }
- grid[t.name][arm] = { pass, n: N - err };
- }
- const b = grid[t.name].baseline,
- p = grid[t.name].ponytail;
- const flag =
- p.pass < b.pass
- ? " <-- PONYTAIL REGRESSION"
- : p.pass < p.n
- ? " (both imperfect)"
- : "";
- console.log(
- `${t.name.padEnd(16)} baseline ${b.pass}/${b.n} ponytail ${p.pass}/${p.n}${flag}`,
- );
- }
- console.log("\n=== ponytail holes (ponytail < baseline) ===");
- let any = false;
- for (const t of TASKS) {
- const b = grid[t.name].baseline,
- p = grid[t.name].ponytail;
- if (p.pass < b.pass) {
- console.log(` ${t.name}: ${b.pass} -> ${p.pass}`);
- any = true;
- }
- }
- if (!any) console.log(" none");
-})();
diff --git a/.claude/plugins/ponytail/commands/ponytail-audit.toml b/.claude/plugins/ponytail/commands/ponytail-audit.toml
deleted file mode 100644
index 4ebc3b29..00000000
--- a/.claude/plugins/ponytail/commands/ponytail-audit.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-description = "Audit the whole repo for over-engineering, what can be deleted"
-prompt = "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.'"
diff --git a/.claude/plugins/ponytail/commands/ponytail-debt.toml b/.claude/plugins/ponytail/commands/ponytail-debt.toml
deleted file mode 100644
index fe41f09b..00000000
--- a/.claude/plugins/ponytail/commands/ponytail-debt.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-description = "Harvest ponytail: comments into a tracked debt ledger"
-prompt = "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."
diff --git a/.claude/plugins/ponytail/commands/ponytail-help.toml b/.claude/plugins/ponytail/commands/ponytail-help.toml
deleted file mode 100644
index 20399a6c..00000000
--- a/.claude/plugins/ponytail/commands/ponytail-help.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-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."
diff --git a/.claude/plugins/ponytail/commands/ponytail-review.toml b/.claude/plugins/ponytail/commands/ponytail-review.toml
deleted file mode 100644
index 81769d86..00000000
--- a/.claude/plugins/ponytail/commands/ponytail-review.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-description = "Review changes for over-engineering, what can be deleted"
-prompt = "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.'"
diff --git a/.claude/plugins/ponytail/commands/ponytail.toml b/.claude/plugins/ponytail/commands/ponytail.toml
deleted file mode 100644
index 8f3934a1..00000000
--- a/.claude/plugins/ponytail/commands/ponytail.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-description = "Switch ponytail intensity level (lite/full/ultra/off)"
-prompt = "Switch to ponytail {{args}} 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."
diff --git a/.claude/plugins/ponytail/docs/agent-portability.md b/.claude/plugins/ponytail/docs/agent-portability.md
deleted file mode 100644
index 40b4af8c..00000000
--- a/.claude/plugins/ponytail/docs/agent-portability.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# Agent Portability
-
-Ponytail is an agent-portable skill distribution. The skills in `skills/` hold
-the core behavior; host-specific files are adapters that make that behavior easy
-to load in a given agent.
-
-## Supported Adapters
-
-| Host | Files | Notes |
-|------|-------|-------|
-| Claude Code | `.claude-plugin/`, `commands/`, `hooks/` | Full plugin install with session activation, mode tracking, commands, and statusline support. |
-| Codex | `.codex-plugin/plugin.json`, `hooks/hooks.json`, `hooks/`, `skills/` | Plugin install with the same skills plus lifecycle hooks for activation and mode tracking. |
-| OpenCode | `.opencode/plugins/ponytail.mjs`, `.opencode/command/`, `hooks/`, `skills/` | Server plugin injects the ruleset each turn via `experimental.chat.system.transform` and persists `/ponytail` switches; reuses the shared instruction builder. |
-| pi | `pi-extension/`, `skills/`, `hooks/` | Package extension: injects the ruleset each turn through the shared instruction builder and registers the `/ponytail` commands. |
-| Gemini CLI | `gemini-extension.json`, `AGENTS.md`, `commands/`, `skills/` | Extension manifest points `contextFileName` at `AGENTS.md` for always-on rules, and reuses the existing `commands/*.toml` and `skills/`, which Gemini CLI auto-discovers. |
-| Cursor | `.cursor/rules/ponytail.mdc` | Always-on project rule. |
-| Windsurf | `.windsurf/rules/ponytail.md` | Project rule. |
-| Cline | `.clinerules/ponytail.md` | Project rule. |
-| GitHub Copilot | `.github/copilot-instructions.md` | Repository instruction file. |
-| GitHub Copilot CLI | `.github/plugin/`, `AGENTS.md`, `.github/copilot-instructions.md`, `~/.copilot/copilot-instructions.md` | Plugin-supported (`copilot plugin marketplace add DietrichGebert/ponytail` + `copilot plugin install ponytail@ponytail`). Fallback instruction mode remains: per-project from `AGENTS.md` or `.github/copilot-instructions.md`, or globally from `~/.copilot/copilot-instructions.md` (instruction-tier, no `/ponytail` levels or hooks). |
-| Antigravity | `AGENTS.md` | Reads `AGENTS.md` at the repo root as always-on rules (like `.cursorrules`/`CLAUDE.md`); `.agents/rules/` also works for workspace rules. Instruction-tier. |
-| VS Code + Codex extension | `AGENTS.md` | The Codex extension reads `AGENTS.md` (repo root, or `~/.codex/AGENTS.md` globally). Instruction-tier; the full Codex plugin row above adds `/ponytail` levels and hooks. |
-| Kiro | `.kiro/steering/ponytail.md` | Steering rule; copy globally or into a project. |
-| Generic agents | `AGENTS.md` or `skills/*/SKILL.md` | Copy the compact rule file or load the skill files directly. |
-
-## Adapter Rule
-
-Keep adapters thin. When a host supports skills or hooks, point it at the
-existing `skills/` and `hooks/` files. When a host only supports project
-instructions, keep its copied rule text aligned with `AGENTS.md`.
-
-## Portable Behavior
-
-- `skills/ponytail/SKILL.md`: lazy senior dev mode
-- `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-help/SKILL.md`: quick reference
-- `AGENTS.md`: compact always-on instruction set for agents without skill support
diff --git a/.claude/plugins/ponytail/examples/api-endpoint.md b/.claude/plugins/ponytail/examples/api-endpoint.md
deleted file mode 100644
index 4e26570a..00000000
--- a/.claude/plugins/ponytail/examples/api-endpoint.md
+++ /dev/null
@@ -1,68 +0,0 @@
-# API Endpoint
-
-**Task:** "Add an endpoint that returns a user by id."
-
-## Without Ponytail
-
-```
-app/
-├── controllers/user_controller.py
-├── services/user_service.py
-├── repositories/user_repository.py
-├── schemas/user_schemas.py
-└── exceptions/user_exceptions.py
-```
-
-```python
-# schemas/user_schemas.py
-class UserResponseDTO(BaseModel):
- id: int
- name: str
- email: str
-
-# repositories/user_repository.py
-class UserRepository:
- def __init__(self, db: Session):
- self.db = db
- def find_by_id(self, user_id: int) -> User | None:
- return self.db.get(User, user_id)
-
-# services/user_service.py
-class UserService:
- def __init__(self, repo: UserRepository):
- self.repo = repo
- def get_user(self, user_id: int) -> User:
- user = self.repo.find_by_id(user_id)
- if user is None:
- raise UserNotFoundError(user_id)
- return user
-
-# controllers/user_controller.py
[email protected]("/users/{user_id}", response_model=UserResponseDTO)
-def get_user(user_id: int, service: UserService = Depends(get_user_service)):
- try:
- return service.get_user(user_id)
- except UserNotFoundError:
- raise HTTPException(status_code=404, detail="User not found")
-```
-
-Five files, three classes, a custom exception, and a dependency-injection chain, wrapping one database call.
-
-## With Ponytail
-
-```python
-# ponytail: drop the layers; keep the response schema, it whitelists what leaves the API
-class UserOut(BaseModel):
- id: int
- name: str
- email: str
-
[email protected]("/users/{user_id}", response_model=UserOut)
-def get_user(user_id: int, db: Session = Depends(get_db)):
- user = db.get(User, user_id)
- if not user:
- raise HTTPException(404)
- return user
-```
-
-**5 files → 9 lines.** The repository, service, and custom exception were ceremony. The response schema was not: it whitelists which fields leave the API, so it stays. Returning the raw ORM model (`return user`) would leak every column, including the ones you never meant to expose. That is the line ponytail draws, and it is the same one the skill draws in "when NOT to be lazy": cut the layers, keep the trust boundary. Add a service layer when a second caller shows up, if it ever does.
diff --git a/.claude/plugins/ponytail/examples/caching.md b/.claude/plugins/ponytail/examples/caching.md
deleted file mode 100644
index 7dbe205e..00000000
--- a/.claude/plugins/ponytail/examples/caching.md
+++ /dev/null
@@ -1,74 +0,0 @@
-# Caching System
-
-**Task:** "We should cache these API responses."
-
-## Without Ponytail
-
-```python
-import time
-import threading
-from collections import OrderedDict
-from dataclasses import dataclass
-from typing import Any, Optional
-
-
-@dataclass
-class CacheEntry:
- value: Any
- expires_at: float
-
-
-class TTLCache:
- """Thread-safe LRU cache with per-entry TTL and max size."""
-
- def __init__(self, max_size: int = 1000, default_ttl: float = 300.0):
- self._store: OrderedDict[str, CacheEntry] = OrderedDict()
- self._lock = threading.Lock()
- self.max_size = max_size
- self.default_ttl = default_ttl
- self.hits = 0
- self.misses = 0
-
- def get(self, key: str) -> Optional[Any]:
- with self._lock:
- entry = self._store.get(key)
- if entry is None or entry.expires_at < time.monotonic():
- self.misses += 1
- self._store.pop(key, None)
- return None
- self._store.move_to_end(key)
- self.hits += 1
- return entry.value
-
- def set(self, key: str, value: Any, ttl: Optional[float] = None) -> None:
- with self._lock:
- if len(self._store) >= self.max_size:
- self._store.popitem(last=False)
- self._store[key] = CacheEntry(
- value, time.monotonic() + (ttl or self.default_ttl)
- )
-
- # ... plus invalidation, stats endpoint, and unit tests for all of it
-```
-
-120 lines of custom infrastructure for a problem nobody has measured yet.
-
-## With Ponytail
-
-First question: **do you actually need a cache?**
-
-- **Unsure?** Ship without it. Add it when you measure the problem. (YAGNI)
-- **Pure function, hot path?** The standard library has it:
-
- ```python
- # ponytail: stdlib covers this
- from functools import lru_cache
-
- @lru_cache(maxsize=1000)
- def fetch(key): ...
- ```
-
-- **Real distributed caching needs?** Use Redis / memcached / your platform's
- cache. Infrastructure problems get infrastructure, not a homemade class.
-
-**120 lines → 0–3 lines.** The fastest cache is the one you didn't have to debug.
diff --git a/.claude/plugins/ponytail/examples/date-picker.md b/.claude/plugins/ponytail/examples/date-picker.md
deleted file mode 100644
index c357fb72..00000000
--- a/.claude/plugins/ponytail/examples/date-picker.md
+++ /dev/null
@@ -1,48 +0,0 @@
-# Date Picker
-
-**Task:** "Add a date picker to this form."
-
-## Without Ponytail
-
-```bash
-npm install flatpickr
-```
-
-```jsx
-import flatpickr from "flatpickr";
-import "flatpickr/dist/flatpickr.min.css";
-import { useEffect, useRef } from "react";
-
-export default function DatePicker({ value, onChange, minDate, maxDate }) {
- const inputRef = useRef(null);
- const instanceRef = useRef(null);
-
- useEffect(() => {
- instanceRef.current = flatpickr(inputRef.current, {
- defaultDate: value,
- minDate,
- maxDate,
- dateFormat: "Y-m-d",
- onChange: ([date]) => onChange(date),
- });
- return () => instanceRef.current?.destroy();
- }, []);
-
- useEffect(() => {
- instanceRef.current?.setDate(value, false);
- }, [value]);
-
- return <input ref={inputRef} className="date-picker" />;
-}
-```
-
-One dependency, one wrapper component, two `useEffect` hooks, a cleanup function, and a CSS import, to pick a date.
-
-## With Ponytail
-
-```html
-<!-- ponytail: browser has one -->
-<input type="date">
-```
-
-**1 dependency + 30 lines → 0 dependencies + 1 line.** Native, accessible, localized, keyboard-navigable, mobile-friendly. The browser team already did the work.
diff --git a/.claude/plugins/ponytail/examples/email-validation.md b/.claude/plugins/ponytail/examples/email-validation.md
deleted file mode 100644
index 4b69aa6e..00000000
--- a/.claude/plugins/ponytail/examples/email-validation.md
+++ /dev/null
@@ -1,51 +0,0 @@
-# Email Validation
-
-**Task:** "Validate an email address in Python."
-
-## Without Ponytail
-
-```python
-import re
-
-EMAIL_PATTERN = re.compile(
- r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$'
-)
-
-class EmailValidator:
- """Validates email addresses against RFC-like rules."""
-
- def __init__(self, pattern: re.Pattern = EMAIL_PATTERN):
- self.pattern = pattern
-
- def validate(self, email: str) -> bool:
- if not isinstance(email, str):
- raise TypeError("email must be a string")
- email = email.strip()
- if not email:
- return False
- return bool(self.pattern.match(email))
-
-
-def validate_email(email: str) -> bool:
- """Convenience wrapper around EmailValidator."""
- return EmailValidator().validate(email)
-```
-
-A class, a wrapper, a regex that still rejects valid addresses and accepts invalid ones. Regex cannot validate email. Only a delivery attempt can.
-
-## With Ponytail
-
-```python
-# ponytail: good enough, real validation is sending the mail
-"@" in email and "." in email.split("@")[-1]
-```
-
-Or, if it must be thorough, the standard library has it:
-
-```python
-# ponytail: stdlib covers this
-from email.utils import parseaddr
-"@" in parseaddr(email)[1]
-```
-
-**27 lines → 1 line.** And the honest answer: let the confirmation email reject it. That's what confirmation emails are for.
diff --git a/.claude/plugins/ponytail/examples/sorting.md b/.claude/plugins/ponytail/examples/sorting.md
deleted file mode 100644
index aa31f3b3..00000000
--- a/.claude/plugins/ponytail/examples/sorting.md
+++ /dev/null
@@ -1,42 +0,0 @@
-# Sorting
-
-**Task:** "Sort this array of numbers."
-
-## Without Ponytail
-
-```js
-function quickSort(arr, compareFn = (a, b) => a - b) {
- if (arr.length <= 1) return arr;
-
- const pivot = arr[Math.floor(arr.length / 2)];
- const left = [];
- const right = [];
- const equal = [];
-
- for (const item of arr) {
- const cmp = compareFn(item, pivot);
- if (cmp < 0) left.push(item);
- else if (cmp > 0) right.push(item);
- else equal.push(item);
- }
-
- return [
- ...quickSort(left, compareFn),
- ...equal,
- ...quickSort(right, compareFn),
- ];
-}
-
-const sorted = quickSort(numbers);
-```
-
-A hand-rolled quicksort. It allocates three arrays per recursion level, blows the stack on large inputs, and replaces an engine-optimized native sort with homework.
-
-## With Ponytail
-
-```js
-// ponytail: this exists
-numbers.sort((a, b) => a - b)
-```
-
-**24 lines → 1 line.** Every runtime ships a sort tuned by people whose whole job is sorting. Use it.
diff --git a/.claude/plugins/ponytail/gemini-extension.json b/.claude/plugins/ponytail/gemini-extension.json
deleted file mode 100644
index a8c13933..00000000
--- a/.claude/plugins/ponytail/gemini-extension.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "name": "ponytail",
- "version": "4.7.0",
- "description": "Lazy senior dev mode. Forces the simplest, shortest solution that actually works: YAGNI, stdlib first, no unrequested abstractions.",
- "contextFileName": "AGENTS.md"
-}
diff --git a/.claude/plugins/ponytail/hooks/copilot-hooks.json b/.claude/plugins/ponytail/hooks/copilot-hooks.json
deleted file mode 100644
index 1210c35a..00000000
--- a/.claude/plugins/ponytail/hooks/copilot-hooks.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "version": 1,
- "hooks": {
- "sessionStart": [
- {
- "type": "command",
- "bash": "node \"${PLUGIN_ROOT}/hooks/ponytail-activate.js\"",
- "powershell": "node \"${PLUGIN_ROOT}\\hooks\\ponytail-activate.js\"",
- "timeoutSec": 5
- }
- ],
- "userPromptSubmitted": [
- {
- "type": "command",
- "bash": "node \"${PLUGIN_ROOT}/hooks/ponytail-mode-tracker.js\"",
- "powershell": "node \"${PLUGIN_ROOT}\\hooks\\ponytail-mode-tracker.js\"",
- "timeoutSec": 5
- }
- ]
- }
-}
diff --git a/.claude/plugins/ponytail/hooks/hooks.json b/.claude/plugins/ponytail/hooks/hooks.json
deleted file mode 100644
index 483c3e17..00000000
--- a/.claude/plugins/ponytail/hooks/hooks.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "hooks": {
- "SessionStart": [
- {
- "matcher": "startup|resume|clear|compact",
- "hooks": [
- {
- "type": "command",
- "command": "command -v node >/dev/null 2>&1 && node \"${CLAUDE_PLUGIN_ROOT}/hooks/ponytail-activate.js\" || exit 0",
- "commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { node \"$env:CLAUDE_PLUGIN_ROOT\\hooks\\ponytail-activate.js\" }",
- "timeout": 5,
- "statusMessage": "Loading ponytail mode..."
- }
- ]
- }
- ],
- "UserPromptSubmit": [
- {
- "hooks": [
- {
- "type": "command",
- "command": "command -v node >/dev/null 2>&1 && node \"${CLAUDE_PLUGIN_ROOT}/hooks/ponytail-mode-tracker.js\" || exit 0",
- "commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { node \"$env:CLAUDE_PLUGIN_ROOT\\hooks\\ponytail-mode-tracker.js\" }",
- "timeout": 5,
- "statusMessage": "Tracking ponytail mode..."
- }
- ]
- }
- ]
- }
-}
diff --git a/.claude/plugins/ponytail/opencode.json b/.claude/plugins/ponytail/opencode.json
deleted file mode 100644
index 2c0be992..00000000
--- a/.claude/plugins/ponytail/opencode.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "$schema": "https://opencode.ai/config.json",
- "plugin": ["./.opencode/plugins/ponytail.mjs"]
-}
diff --git a/.claude/plugins/ponytail/package.json b/.claude/plugins/ponytail/package.json
deleted file mode 100644
index 90426bf0..00000000
--- a/.claude/plugins/ponytail/package.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "name": "ponytail",
- "version": "0.1.0",
- "description": "Lazy senior dev mode for AI agents. The best code is the code you never wrote.",
- "keywords": [
- "pi-package",
- "pi",
- "skills",
- "ponytail"
- ],
- "license": "MIT",
- "scripts": {
- "test": "node --test tests/*.test.js && npm test --prefix pi-extension"
- },
- "pi": {
- "extensions": [
- "./pi-extension/index.js"
- ],
- "skills": [
- "./skills"
- ]
- }
-}
diff --git a/.claude/plugins/ponytail/pi-extension/index.js b/.claude/plugins/ponytail/pi-extension/index.js
deleted file mode 100644
index ea6ac5bc..00000000
--- a/.claude/plugins/ponytail/pi-extension/index.js
+++ /dev/null
@@ -1,173 +0,0 @@
-import { createRequire } from "node:module";
-
-const require = createRequire(import.meta.url);
-const {
- DEFAULT_MODE,
- getDefaultMode,
- normalizeMode,
- normalizeConfigMode,
- normalizePersistedMode,
- writeDefaultMode,
-} = require("../hooks/ponytail-config.js");
-const {
- getPonytailInstructions,
- filterSkillBodyForMode,
-} = require("../hooks/ponytail-instructions.js");
-
-export { filterSkillBodyForMode };
-export const readDefaultMode = getDefaultMode;
-
-export function resolveSessionMode(entries, fallbackMode = DEFAULT_MODE) {
- const fallback = normalizePersistedMode(fallbackMode) || DEFAULT_MODE;
- if (!Array.isArray(entries)) return fallback;
-
- for (let i = entries.length - 1; i >= 0; i -= 1) {
- const entry = entries[i];
- if (entry?.type !== "custom" || entry?.customType !== "ponytail-mode")
- continue;
-
- const mode = normalizePersistedMode(entry?.data?.mode);
- if (mode) return mode;
- }
-
- return fallback;
-}
-
-export function parsePonytailCommand(text, defaultMode = DEFAULT_MODE) {
- const fallback = normalizePersistedMode(defaultMode) || DEFAULT_MODE;
- const normalizedText = String(text || "")
- .trim()
- .toLowerCase();
-
- if (!normalizedText) {
- return { type: "set-mode", mode: fallback === "off" ? "full" : fallback };
- }
-
- const [primary, secondary] = normalizedText.split(/\s+/);
-
- if (primary === "status") return { type: "status" };
-
- if (primary === "default") {
- const mode = normalizeConfigMode(secondary);
- return mode
- ? { type: "set-default", mode }
- : { type: "invalid", reason: "invalid-default-mode" };
- }
-
- const mode = normalizeMode(primary);
- return mode
- ? { type: "set-mode", mode }
- : { type: "invalid", reason: "invalid-mode", mode: primary };
-}
-
-export { writeDefaultMode };
-
-export default function ponytailExtension(pi) {
- let currentMode = DEFAULT_MODE;
- let configuredDefaultMode = getDefaultMode();
-
- const setMode = (mode, ctx) => {
- const normalized = normalizePersistedMode(mode);
- if (!normalized) return;
-
- currentMode = normalized;
- pi.appendEntry("ponytail-mode", { mode: normalized });
- ctx?.ui?.notify?.(`Ponytail mode set to ${normalized}.`, "info");
- };
-
- const sendAlias = (skillName, args, ctx) => {
- const normalized = String(args || "").trim();
- const message = normalized ? `${skillName} ${normalized}` : skillName;
-
- if (ctx?.isIdle?.() === false) {
- pi.sendUserMessage(message, { deliverAs: "followUp" });
- ctx?.ui?.notify?.(`${skillName} queued as follow-up.`, "info");
- return;
- }
-
- pi.sendUserMessage(message);
- };
-
- pi.registerCommand("ponytail", {
- description: "Set or report Ponytail mode",
- handler: async (args, ctx) => {
- const parsed = parsePonytailCommand(args, configuredDefaultMode);
-
- if (parsed.type === "status") {
- ctx?.ui?.notify?.(
- `Ponytail: current ${currentMode} • default ${configuredDefaultMode}`,
- "info",
- );
- return;
- }
-
- if (parsed.type === "set-default") {
- const written = writeDefaultMode(parsed.mode);
- if (written) {
- configuredDefaultMode = getDefaultMode();
- const message =
- configuredDefaultMode === written
- ? `Default Ponytail mode set to ${written}.`
- : `Saved default ${written}, but env override keeps default at ${configuredDefaultMode}.`;
- ctx?.ui?.notify?.(message, "info");
- }
- return;
- }
-
- if (parsed.type === "set-mode") {
- setMode(parsed.mode, ctx);
- return;
- }
-
- ctx?.ui?.notify?.("Unknown or unsupported /ponytail mode.", "warning");
- },
- });
-
- pi.registerCommand("ponytail-review", {
- description: "Run /skill:ponytail-review",
- handler: (_args, ctx) => sendAlias("/skill:ponytail-review", "", ctx),
- });
-
- pi.registerCommand("ponytail-audit", {
- description: "Run /skill:ponytail-audit",
- handler: (_args, ctx) => sendAlias("/skill:ponytail-audit", "", ctx),
- });
-
- pi.registerCommand("ponytail-debt", {
- description: "Run /skill:ponytail-debt",
- handler: (_args, ctx) => sendAlias("/skill:ponytail-debt", "", ctx),
- });
-
- pi.registerCommand("ponytail-help", {
- description: "Run /skill:ponytail-help",
- handler: (_args, ctx) => sendAlias("/skill:ponytail-help", "", ctx),
- });
-
- pi.on("input", async (event) => {
- if (event?.source === "extension") return;
-
- const text = String(event?.text || "");
- if (
- currentMode !== "off" &&
- /\b(stop ponytail|normal mode)\b/i.test(text)
- ) {
- setMode("off");
- }
- });
-
- pi.on("session_start", async (_event, ctx) => {
- const entries =
- ctx?.sessionManager?.getBranch?.() ||
- ctx?.sessionManager?.getEntries?.() ||
- [];
- configuredDefaultMode = getDefaultMode();
- currentMode = resolveSessionMode(entries, configuredDefaultMode);
- });
-
- pi.on("before_agent_start", async (event) => {
- if (!currentMode || currentMode === "off") return;
- return {
- systemPrompt: `${event.systemPrompt}\n\n${getPonytailInstructions(currentMode)}`,
- };
- });
-}
diff --git a/.claude/plugins/ponytail/pi-extension/package.json b/.claude/plugins/ponytail/pi-extension/package.json
deleted file mode 100644
index 745bde25..00000000
--- a/.claude/plugins/ponytail/pi-extension/package.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "name": "ponytail-pi-extension-dev",
- "private": true,
- "type": "module",
- "scripts": {
- "test": "node --test ./test/*.test.js"
- }
-}
diff --git a/.claude/plugins/ponytail/pi-extension/test/extension.test.js b/.claude/plugins/ponytail/pi-extension/test/extension.test.js
deleted file mode 100644
index b511663b..00000000
--- a/.claude/plugins/ponytail/pi-extension/test/extension.test.js
+++ /dev/null
@@ -1,151 +0,0 @@
-import assert from "node:assert/strict";
-import { mkdtempSync, rmSync } from "node:fs";
-import { tmpdir } from "node:os";
-import { join } from "node:path";
-import test from "node:test";
-
-import ponytailExtension from "../index.js";
-
-function createPiHarness() {
- const events = new Map();
- const commands = new Map();
- const appendedEntries = [];
- const sentUserMessages = [];
-
- const pi = {
- on(eventName, handler) {
- events.set(eventName, handler);
- },
- registerCommand(name, options) {
- commands.set(name, options);
- },
- appendEntry(customType, data) {
- appendedEntries.push({ customType, data });
- },
- sendUserMessage(text, options) {
- sentUserMessages.push({ text, options });
- },
- };
-
- ponytailExtension(pi);
- return { events, commands, appendedEntries, sentUserMessages };
-}
-
-function createCommandContext(overrides = {}) {
- return {
- isIdle: () => true,
- sessionManager: { getEntries: () => [] },
- ui: { notify() {} },
- ...overrides,
- };
-}
-
-function withTempConfig(fn) {
- const tempConfigHome = mkdtempSync(join(tmpdir(), "ponytail-test-"));
- const previousXdg = process.env.XDG_CONFIG_HOME;
- process.env.XDG_CONFIG_HOME = tempConfigHome;
-
- return Promise.resolve()
- .then(fn)
- .finally(() => {
- if (previousXdg === undefined) delete process.env.XDG_CONFIG_HOME;
- else process.env.XDG_CONFIG_HOME = previousXdg;
- rmSync(tempConfigHome, { recursive: true, force: true });
- });
-}
-
-test("extension registers Ponytail commands", () => {
- const { commands } = createPiHarness();
-
- assert.deepEqual([...commands.keys()].sort(), [
- "ponytail",
- "ponytail-audit",
- "ponytail-debt",
- "ponytail-help",
- "ponytail-review",
- ]);
-});
-
-test("/ponytail updates session mode and injects instructions", async () =>
- withTempConfig(async () => {
- const { commands, events, appendedEntries } = createPiHarness();
- const ctx = createCommandContext();
-
- await events.get("session_start")({ reason: "startup" }, ctx);
- await commands.get("ponytail").handler("ultra", ctx);
-
- assert.deepEqual(appendedEntries.at(-1), {
- customType: "ponytail-mode",
- data: { mode: "ultra" },
- });
-
- const result = await events.get("before_agent_start")(
- { systemPrompt: "BASE" },
- ctx,
- );
- assert.ok(result.systemPrompt.includes("PONYTAIL MODE ACTIVE"));
- assert.ok(result.systemPrompt.includes("ultra"));
- }));
-
-test("session_start restores latest persisted mode", async () =>
- withTempConfig(async () => {
- const { events } = createPiHarness();
- const ctx = createCommandContext({
- sessionManager: {
- getEntries: () => [
- {
- type: "custom",
- customType: "ponytail-mode",
- data: { mode: "lite" },
- },
- ],
- },
- });
-
- await events.get("session_start")({ reason: "resume" }, ctx);
- const result = await events.get("before_agent_start")(
- { systemPrompt: "BASE" },
- ctx,
- );
-
- assert.ok(result.systemPrompt.includes("lite"));
- }));
-
-test("skill alias commands delegate to Pi skill commands", async () => {
- const { commands, sentUserMessages } = createPiHarness();
- const ctx = createCommandContext();
-
- 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-help").handler("", ctx);
-
- assert.deepEqual(
- sentUserMessages.map((entry) => entry.text),
- [
- "/skill:ponytail-review",
- "/skill:ponytail-audit",
- "/skill:ponytail-debt",
- "/skill:ponytail-help",
- ],
- );
-});
-
-test("normal mode disables persistent instructions", async () =>
- withTempConfig(async () => {
- const { commands, events } = createPiHarness();
- const ctx = createCommandContext();
-
- await events.get("session_start")({ reason: "startup" }, ctx);
- await commands.get("ponytail").handler("ultra", ctx);
- await events.get("input")(
- { text: "normal mode", source: "interactive" },
- ctx,
- );
-
- const disabled = await events.get("before_agent_start")(
- { systemPrompt: "BASE" },
- ctx,
- );
- assert.equal(disabled, undefined);
- }));
diff --git a/.claude/plugins/ponytail/pi-extension/test/helpers.test.js b/.claude/plugins/ponytail/pi-extension/test/helpers.test.js
deleted file mode 100644
index 13f389d8..00000000
--- a/.claude/plugins/ponytail/pi-extension/test/helpers.test.js
+++ /dev/null
@@ -1,103 +0,0 @@
-import assert from "node:assert/strict";
-import { existsSync, mkdtempSync, readFileSync, rmSync } from "node:fs";
-import { tmpdir } from "node:os";
-import { join } from "node:path";
-import test from "node:test";
-
-import {
- filterSkillBodyForMode,
- parsePonytailCommand,
- readDefaultMode,
- resolveSessionMode,
- writeDefaultMode,
-} from "../index.js";
-
-test("parsePonytailCommand falls back to full when invoked bare and default is off", () => {
- assert.deepEqual(parsePonytailCommand("", "off"), {
- type: "set-mode",
- mode: "full",
- });
-});
-
-test("parsePonytailCommand parses modes, status, and default subcommand", () => {
- assert.deepEqual(parsePonytailCommand("ultra", "full"), {
- type: "set-mode",
- mode: "ultra",
- });
- assert.deepEqual(parsePonytailCommand("status", "full"), { type: "status" });
- assert.deepEqual(parsePonytailCommand("default lite", "full"), {
- type: "set-default",
- mode: "lite",
- });
-});
-
-test("resolveSessionMode prefers latest persisted session mode", () => {
- const entries = [
- { type: "custom", customType: "ponytail-mode", data: { mode: "lite" } },
- { type: "custom", customType: "ponytail-mode", data: { mode: "ultra" } },
- ];
-
- assert.equal(resolveSessionMode(entries, "full"), "ultra");
-});
-
-test("readDefaultMode and writeDefaultMode use XDG config path", () => {
- const tempDir = mkdtempSync(join(tmpdir(), "ponytail-config-"));
- const previousXdg = process.env.XDG_CONFIG_HOME;
- const previousDefault = process.env.PONYTAIL_DEFAULT_MODE;
- const configPath = join(tempDir, "ponytail", "config.json");
- process.env.XDG_CONFIG_HOME = tempDir;
- delete process.env.PONYTAIL_DEFAULT_MODE;
-
- try {
- assert.equal(readDefaultMode(), "full");
- assert.equal(writeDefaultMode("ultra"), "ultra");
- assert.equal(readDefaultMode(), "ultra");
- assert.ok(existsSync(configPath));
- assert.deepEqual(JSON.parse(readFileSync(configPath, "utf8")), {
- defaultMode: "ultra",
- });
- } finally {
- if (previousXdg === undefined) delete process.env.XDG_CONFIG_HOME;
- else process.env.XDG_CONFIG_HOME = previousXdg;
- if (previousDefault === undefined) delete process.env.PONYTAIL_DEFAULT_MODE;
- else process.env.PONYTAIL_DEFAULT_MODE = previousDefault;
- rmSync(tempDir, { recursive: true, force: true });
- }
-});
-
-test("filterSkillBodyForMode keeps only requested intensity examples and rows", () => {
- const body = `---\nname: ponytail\n---\n| **lite** | keep lite |\n| **full** | keep full |\n| **ultra** | keep ultra |\n- lite: Lite example\n- full: Full example\n- ultra: Ultra example\nOther line`;
-
- const filtered = filterSkillBodyForMode(body, "ultra");
-
- assert.ok(!filtered.includes("keep lite"));
- assert.ok(!filtered.includes("keep full"));
- assert.ok(filtered.includes("keep ultra"));
- assert.ok(!filtered.includes("Lite example"));
- assert.ok(filtered.includes("Ultra example"));
- assert.ok(filtered.includes("Other line"));
-});
-
-test("filterSkillBodyForMode keeps rule bullets that contain a colon", () => {
- // Regression: rule bullets outside the Intensity section (e.g. the
- // "No unrequested abstractions:" rule or the `ponytail:` comment convention)
- // contain a colon and must not be mistaken for mode-example lines.
- const skillPath = join(
- import.meta.dirname,
- "..",
- "..",
- "skills",
- "ponytail",
- "SKILL.md",
- );
- const body = readFileSync(skillPath, "utf8");
-
- const filtered = filterSkillBodyForMode(body, "full");
-
- assert.ok(filtered.includes("No unrequested abstractions"));
- assert.ok(filtered.includes("Mark deliberate simplifications"));
- // The Intensity examples are still filtered down to the active mode.
- assert.ok(filtered.includes('full: "`@lru_cache'));
- assert.ok(!filtered.includes('lite: "Done'));
- assert.ok(!filtered.includes('ultra: "No cache'));
-});
diff --git a/.claude/plugins/ponytail/scripts/build-openclaw-skills.js b/.claude/plugins/ponytail/scripts/build-openclaw-skills.js
deleted file mode 100644
index c1a124c1..00000000
--- a/.claude/plugins/ponytail/scripts/build-openclaw-skills.js
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/env node
-// Generate the OpenClaw / ClawHub skill package (.openclaw/skills/) from the
-// canonical skills/. OpenClaw skills are SKILL.md (frontmatter + body), the same
-// format ponytail already uses, with one difference: `description` must be a
-// single line under 160 chars. The canonical descriptions are long (tuned for
-// Claude's skill picker), so each ships a short one here. The body is copied
-// verbatim from skills/<name>/SKILL.md so the ruleset never drifts; only the
-// frontmatter is rewritten.
-//
-// Run: node scripts/build-openclaw-skills.js
-// tests/openclaw-skills.test.js fails if the committed copies are stale.
-
-const fs = require("fs");
-const path = require("path");
-
-const ROOT = path.join(__dirname, "..");
-const HOMEPAGE = "https://github.com/DietrichGebert/ponytail";
-
-const DESCRIPTIONS = {
- ponytail:
- "Lazy senior dev mode. Forces the simplest, shortest solution that works: YAGNI, stdlib first, no unrequested abstractions.",
- "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-help":
- "Quick reference for ponytail's modes, skills, and commands. One-shot display.",
-};
-
-const NAMES = Object.keys(DESCRIPTIONS);
-
-function sourceBody(name) {
- const src = fs
- .readFileSync(path.join(ROOT, "skills", name, "SKILL.md"), "utf8")
- .replace(/\r\n/g, "\n");
- const fm = src.match(/^---\n[\s\S]*?\n---\n?/);
- if (!fm) throw new Error(`skills/${name}/SKILL.md has no frontmatter`);
- return src.slice(fm[0].length);
-}
-
-function render(name) {
- const desc = DESCRIPTIONS[name];
- if (desc.length > 160 || desc.includes("\n") || desc.includes('"')) {
- throw new Error(
- `description for ${name} must be one line, no quotes, under 160 chars`,
- );
- }
- const frontmatter = `---\nname: ${name}\ndescription: "${desc}"\nhomepage: ${HOMEPAGE}\nlicense: MIT\n---\n`;
- return frontmatter + sourceBody(name);
-}
-
-function outPath(name) {
- return path.join(ROOT, ".openclaw", "skills", name, "SKILL.md");
-}
-
-module.exports = { DESCRIPTIONS, NAMES, render, outPath, sourceBody };
-
-if (require.main === module) {
- for (const name of NAMES) {
- const p = outPath(name);
- fs.mkdirSync(path.dirname(p), { recursive: true });
- fs.writeFileSync(p, render(name));
- console.log("wrote", path.relative(ROOT, p).replace(/\\/g, "/"));
- }
-}
diff --git a/.claude/plugins/ponytail/scripts/check-rule-copies.js b/.claude/plugins/ponytail/scripts/check-rule-copies.js
deleted file mode 100644
index 1926ba10..00000000
--- a/.claude/plugins/ponytail/scripts/check-rule-copies.js
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/usr/bin/env node
-const fs = require("fs");
-const path = require("path");
-
-const root = path.join(__dirname, "..");
-
-function read(relPath) {
- return fs
- .readFileSync(path.join(root, relPath), "utf8")
- .replace(/\r\n/g, "\n")
- .trim();
-}
-
-function stripFrontmatter(text) {
- return text.replace(/^---\n[\s\S]*?\n---\n*/, "").trim();
-}
-
-const agents = read("AGENTS.md");
-const canonical = agents
- .replace(/\n\n\(Yes, this file also applies[\s\S]*?\)$/, "")
- .trim();
-
-// Compact copies: same body as AGENTS.md, host-specific frontmatter stripped.
-const copies = [
- [".cursor/rules/ponytail.mdc", stripFrontmatter],
- [".windsurf/rules/ponytail.md", (text) => text.trim()],
- [".clinerules/ponytail.md", (text) => text.trim()],
- [".github/copilot-instructions.md", (text) => text.trim()],
- [".kiro/steering/ponytail.md", stripFrontmatter],
-];
-
-let failed = false;
-
-for (const [relPath, normalize] of copies) {
- const actual = normalize(read(relPath));
- if (actual !== canonical) {
- console.error(`${relPath} drifted from AGENTS.md`);
- failed = true;
- }
-}
-
-// SKILL.md is the runtime source of truth and is longer than the compact body,
-// so it cannot be byte-compared. ponytail: canary, not full equality. Assert the
-// load-bearing rules survive verbatim in both the source and AGENTS.md. Changing
-// a rule's wording trips this, which is the reminder to propagate it everywhere.
-// Upgrade path: generate the copies from SKILL.md if this ever misses a real drift.
-const INVARIANTS = [
- "naive heuristic", // ceiling-comment rule
- "ONE runnable check", // test reflex
- "flimsier algorithm", // robust-variant rule
- "input validation at trust boundaries", // the "not lazy about" clause
- "Lazy code without its check is unfinished", // one-check promoted to headline
-];
-
-const skill = read("skills/ponytail/SKILL.md");
-const sources = [
- ["skills/ponytail/SKILL.md", skill],
- ["AGENTS.md", agents],
-];
-for (const phrase of INVARIANTS) {
- for (const [label, text] of sources) {
- if (!text.includes(phrase)) {
- console.error(`${label} is missing rule invariant: "${phrase}"`);
- failed = true;
- }
- }
-}
-
-if (failed) {
- console.error(
- "Update the copied rule text, AGENTS.md, or SKILL.md so the shared rules match.",
- );
- process.exit(1);
-}
-
-console.log(
- `Rule copies match AGENTS.md; ${INVARIANTS.length} rule invariants present in SKILL.md and AGENTS.md.`,
-);
diff --git a/.claude/plugins/ponytail/tests/behavior.test.js b/.claude/plugins/ponytail/tests/behavior.test.js
deleted file mode 100644
index eded3d56..00000000
--- a/.claude/plugins/ponytail/tests/behavior.test.js
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/usr/bin/env node
-// Unit test for the behavior gate (benchmarks/behavior.js). Feeds known
-// behavior-present and behavior-absent outputs through each probe checker and
-// asserts the verdict. Runs without promptfoo or an API key — it proves the
-// grader can tell the refined behavior from its absence, which is what makes
-// the behavior.yaml eval trustworthy.
-
-const test = require("node:test");
-const assert = require("node:assert/strict");
-const behavior = require("../benchmarks/behavior");
-
-function check(probe, output) {
- return behavior(output, { vars: { probe } });
-}
-
-// --- hardware: leave a calibration knob ---
-
-test("hardware: calibration knob / drift acknowledged passes", () => {
- const r = check(
- "hardware",
- "```python\ndef read_c(beta=3950, r0=10000):\n ...\n```\n" +
- "Notes: beta/r0 drift part-to-part, measure your own r0 at a known temp.",
- );
- assert.equal(r.pass, true);
- assert.equal(r.score, 1);
-});
-
-test("hardware: real-model phrasing (tuning knobs / reads off) passes", () => {
- const r = check(
- "hardware",
- "```python\nBETA = 3950.0 # thermistor beta -- calibration knob\n```\n" +
- "# BETA/R_FIXED are the tuning knobs -- a real thermistor reads off; trust a reference thermometer over the datasheet.",
- );
- assert.equal(r.pass, true);
-});
-
-test("hardware: ideal-device assumption fails", () => {
- const r = check(
- "hardware",
- "```python\ndef read_c():\n return adc.read(0) * 0.1\n```\n" +
- "Notes: converts the raw ADC reading straight to Celsius.",
- );
- assert.equal(r.pass, false);
- assert.equal(r.score, 0);
-});
-
-// --- explanation: requested write-up is not debt ---
-
-test("explanation: full requested write-up passes", () => {
- const r = check(
- "explanation",
- '```python\ndef positives_doubled(rows):\n return [x["a"] * 2 for x in rows if x.get("a", 0) > 0]\n```\n' +
- "1. Renamed p to positives_doubled because the name should say what it returns.\n" +
- "2. Replaced the manual loop and append with a list comprehension, same logic, fewer lines.\n" +
- '3. Used x.get("a", 0) so a missing key is treated as zero instead of raising.\n' +
- "4. Kept the > 0 filter; the behavior is unchanged, only the shape is clearer.",
- );
- assert.equal(r.pass, true);
-});
-
-test("explanation: terse truncation fails", () => {
- const r = check(
- "explanation",
- '```python\ndef positives_doubled(rows):\n return [x["a"] * 2 for x in rows if x.get("a", 0) > 0]\n```\n' +
- "skipped: the loop. comprehension covers it.",
- );
- assert.equal(r.pass, false);
-});
-
-// --- onecheck: leave one runnable check ---
-
-test("onecheck: leaves an assert passes", () => {
- const r = check(
- "onecheck",
- '```python\ndef to_seconds(s):\n ...\n\nassert to_seconds("1h30m") == 5400\n```',
- );
- assert.equal(r.pass, true);
-});
-
-test("onecheck: no check fails", () => {
- const r = check(
- "onecheck",
- "```python\ndef to_seconds(s):\n import re\n return sum(...)\n```",
- );
- assert.equal(r.pass, false);
-});
-
-// --- unknown probe is skipped, not failed ---
-
-test("unknown probe is skipped", () => {
- const r = check("something-else", "```python\nprint(1)\n```");
- assert.equal(r.pass, true);
- assert.match(r.reason, /skipped/i);
-});
diff --git a/.claude/plugins/ponytail/tests/commands.test.js b/.claude/plugins/ponytail/tests/commands.test.js
deleted file mode 100644
index e36680eb..00000000
--- a/.claude/plugins/ponytail/tests/commands.test.js
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env node
-// Every ponytail command the pi extension registers must also ship as a
-// file-based command for the hosts that need one: Claude Code (commands/*.toml,
-// which Gemini CLI reuses) and OpenCode (.opencode/command/*.md). /ponytail-help
-// was advertised in the README and the help card but missing both files; this
-// guards that drift -- a registered command with no adapter file fails here.
-
-const test = require("node:test");
-const assert = require("node:assert/strict");
-const fs = require("fs");
-const path = require("path");
-
-const root = path.join(__dirname, "..");
-
-// pi-extension registers the canonical command set.
-const piSource = fs.readFileSync(
- path.join(root, "pi-extension", "index.js"),
- "utf8",
-);
-const commands = [
- ...piSource.matchAll(/registerCommand\(["']([\w-]+)["']/g),
-].map((m) => m[1]);
-
-test("pi registers at least the base command", () => {
- assert.ok(
- commands.includes("ponytail"),
- "expected pi to register a ponytail command",
- );
-});
-
-test("every registered command ships a Claude commands/*.toml", () => {
- for (const name of commands) {
- assert.ok(
- fs.existsSync(path.join(root, "commands", `${name}.toml`)),
- `missing commands/${name}.toml`,
- );
- }
-});
-
-test("every registered command ships an OpenCode .opencode/command/*.md", () => {
- for (const name of commands) {
- assert.ok(
- fs.existsSync(path.join(root, ".opencode", "command", `${name}.md`)),
- `missing .opencode/command/${name}.md`,
- );
- }
-});
diff --git a/.claude/plugins/ponytail/tests/copilot-plugin.test.js b/.claude/plugins/ponytail/tests/copilot-plugin.test.js
deleted file mode 100644
index 780e5ea3..00000000
--- a/.claude/plugins/ponytail/tests/copilot-plugin.test.js
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env node
-// Smoke test for the Copilot plugin adapter: keep command wiring minimal and
-// ensure the debt command is part of the shared command surface.
-
-const test = require("node:test");
-const assert = require("node:assert/strict");
-const fs = require("fs");
-const path = require("path");
-
-const root = path.join(__dirname, "..");
-const REQUIRED_COMMAND_FILES = [
- "ponytail.toml",
- "ponytail-review.toml",
- "ponytail-audit.toml",
- "ponytail-debt.toml",
-];
-
-function readJSON(relPath) {
- return JSON.parse(fs.readFileSync(path.join(root, relPath), "utf8"));
-}
-
-test("copilot plugin command directory includes ponytail-debt", () => {
- const manifest = readJSON(".github/plugin/plugin.json");
- assert.equal(manifest.name, "ponytail");
- assert.equal(manifest.commands, "commands/");
-
- for (const file of REQUIRED_COMMAND_FILES) {
- assert.ok(
- fs.existsSync(path.join(root, manifest.commands, file)),
- `missing command file: ${manifest.commands}${file}`,
- );
- }
-});
diff --git a/.claude/plugins/ponytail/tests/correctness.test.js b/.claude/plugins/ponytail/tests/correctness.test.js
deleted file mode 100644
index 49b8380a..00000000
--- a/.claude/plugins/ponytail/tests/correctness.test.js
+++ /dev/null
@@ -1,193 +0,0 @@
-#!/usr/bin/env node
-// Unit test for the correctness benchmark assertion. Feeds known-good and
-// known-bad LLM outputs through each task checker and asserts the expected
-// pass/fail verdict. Runs without promptfoo — just node:test + the module.
-
-const test = require("node:test");
-const assert = require("node:assert/strict");
-const correctness = require("../benchmarks/correctness");
-
-// Helper: wrap code in a fenced block and call the assertion with task vars.
-function check(task, lang, code) {
- const output = "```" + lang + "\n" + code + "\n```";
- return correctness(output, { vars: { task } });
-}
-
-// --- Email validator ---
-
-test("email: correct one-liner passes", () => {
- const result = check(
- "Write me a Python function that validates email addresses.",
- "python",
- 'def validate_email(email):\n return "@" in email and "." in email.split("@")[-1] and email.split("@")[0] != ""',
- );
- assert.equal(result.pass, true);
- assert.equal(result.score, 1);
-});
-
-test("email: always-true validator fails", () => {
- const result = check(
- "Write me a Python function that validates email addresses.",
- "python",
- "def validate_email(email):\n return True",
- );
- assert.equal(result.pass, false);
- assert.equal(result.score, 0);
-});
-
-test("email: no code block fails", () => {
- const result = correctness("Here is my answer: just use regex.", {
- vars: {
- task: "Write me a Python function that validates email addresses.",
- },
- });
- assert.equal(result.pass, false);
-});
-
-// --- Debounce ---
-
-test("debounce: correct implementation passes", () => {
- const result = check(
- "Add debounce to a search input in vanilla JavaScript.",
- "javascript",
- `function debounce(fn, delay) {
- let timer;
- return function(...args) {
- clearTimeout(timer);
- timer = setTimeout(() => fn.apply(this, args), delay);
- };
-}`,
- );
- assert.equal(result.pass, true);
- assert.equal(result.score, 1);
-});
-
-test("debounce: immediate-call implementation fails", () => {
- const result = check(
- "Add debounce to a search input in vanilla JavaScript.",
- "javascript",
- `function debounce(fn, delay) {
- return function(...args) { fn.apply(this, args); };
-}`,
- );
- assert.equal(result.pass, false);
- assert.equal(result.score, 0);
-});
-
-// --- CSV sum ---
-
-test("csv: correct pandas one-liner passes", () => {
- const result = check(
- "Write Python code that reads sales.csv and sums the 'amount' column.",
- "python",
- `import pandas as pd
-df = pd.read_csv('sales.csv')
-print(df['amount'].sum())`,
- );
- assert.equal(result.pass, true);
- assert.equal(result.score, 1);
-});
-
-test("csv: code that prints wrong value fails", () => {
- const result = check(
- "Write Python code that reads sales.csv and sums the 'amount' column.",
- "python",
- `print(999)`,
- );
- assert.equal(result.pass, false);
- assert.equal(result.score, 0);
-});
-
-test("csv: value containing 351 as substring fails (e.g. 13510)", () => {
- const result = check(
- "Write Python code that reads sales.csv and sums the 'amount' column.",
- "python",
- `print(13510)`,
- );
- assert.equal(result.pass, false);
- assert.equal(result.score, 0);
-});
-
-// --- React countdown ---
-
-test("countdown: valid React component passes", () => {
- const result = check(
- "Build me a countdown timer component in React.",
- "javascript",
- `import { useState, useEffect } from 'react';
-export default function Countdown({ seconds }) {
- const [count, setCount] = useState(seconds);
- useEffect(() => {
- if (count <= 0) return;
- const id = setInterval(() => setCount(prev => prev - 1), 1000);
- return () => clearInterval(id);
- }, [count]);
- return <div>{count}</div>;
-}`,
- );
- assert.equal(result.pass, true);
- assert.equal(result.score, 1);
-});
-
-test("countdown: static div without state fails", () => {
- const result = check(
- "Build me a countdown timer component in React.",
- "javascript",
- `export default function Countdown() { return <div>10</div>; }`,
- );
- assert.equal(result.pass, false);
- assert.equal(result.score, 0);
-});
-
-// --- Rate limiter ---
-
-test("ratelimit: FastAPI with limit logic passes", () => {
- const result = check(
- "Add rate limiting to my FastAPI endpoint so users can't spam it.",
- "python",
- `from fastapi import FastAPI, HTTPException
-import time
-
-app = FastAPI()
-requests = {}
-
-def endpoint(user: str = "anon"):
- now = time.time()
- window = requests.get(user, [])
- window = [t for t in window if now - t < 60]
- if len(window) >= 10:
- raise HTTPException(429, "Too Many Requests")
- window.append(now)
- requests[user] = window
- return {"ok": True}`,
- );
- assert.equal(result.pass, true);
- assert.equal(result.score, 1);
-});
-
-test("ratelimit: plain endpoint without limiting fails", () => {
- const result = check(
- "Add rate limiting to my FastAPI endpoint.",
- "python",
- `from fastapi import FastAPI
-app = FastAPI()
-
-def endpoint():
- return {"ok": True}`,
- );
- assert.equal(result.pass, false);
- assert.equal(result.score, 0);
-});
-
-// --- Edge cases ---
-
-test("unknown task is gracefully skipped", () => {
- const result = correctness('```python\nprint("hi")\n```', {
- vars: { task: "Explain quantum computing." },
- });
- assert.equal(result.pass, true);
- assert.equal(result.score, 1);
- assert.match(result.reason, /unknown task/i);
-});
diff --git a/.claude/plugins/ponytail/tests/gemini-extension.test.js b/.claude/plugins/ponytail/tests/gemini-extension.test.js
deleted file mode 100644
index bba5ba80..00000000
--- a/.claude/plugins/ponytail/tests/gemini-extension.test.js
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/usr/bin/env node
-// Smoke test for the Gemini CLI adapter. The adapter is a single thin manifest
-// (gemini-extension.json) that reuses the repo's existing files: AGENTS.md for
-// always-on context, commands/*.toml for /ponytail + /ponytail-review, and
-// skills/ for the agent skills. This test fails if the manifest is removed,
-// loses its pinned version, or points contextFileName at a file that no longer
-// carries the load-bearing rules — i.e. if the adapter stops wiring ponytail.
-
-const test = require("node:test");
-const assert = require("node:assert/strict");
-const fs = require("fs");
-const path = require("path");
-
-const root = path.join(__dirname, "..");
-const MANIFEST = "gemini-extension.json";
-const EXTENSION_NAME = "ponytail";
-// Floating refs are a supply-chain footgun; the manifest version must be pinned.
-const PINNED_SEMVER = /^\d+\.\d+\.\d+$/;
-const VERSIONED_MANIFESTS = [
- "gemini-extension.json",
- ".claude-plugin/plugin.json",
- ".codex-plugin/plugin.json",
- ".github/plugin/plugin.json",
-];
-// Gemini auto-discovers these by directory; the manifest is only useful if they exist.
-const REUSED_COMMANDS = [
- "commands/ponytail.toml",
- "commands/ponytail-review.toml",
-];
-const REUSED_SKILLS = ["skills/ponytail/SKILL.md"];
-// Same load-bearing phrases asserted by scripts/check-rule-copies.js: the file
-// contextFileName points at must actually carry the rules, not just exist.
-const RULE_INVARIANTS = [
- "lazy senior",
- "input validation at trust boundaries",
- "naive heuristic",
-];
-
-function read(relPath) {
- return fs.readFileSync(path.join(root, relPath), "utf8");
-}
-
-// Read inside each test (not at module scope) so a missing or malformed manifest
-// surfaces as a clean per-test assertion failure, not a load-time crash that
-// collapses every case into one unreadable stack trace.
-function loadManifest() {
- assert.ok(fs.existsSync(path.join(root, MANIFEST)), `${MANIFEST} must exist`);
- return JSON.parse(read(MANIFEST));
-}
-
-test("manifest names the ponytail extension with a pinned version", () => {
- const manifest = loadManifest();
- assert.equal(manifest.name, EXTENSION_NAME);
- assert.match(manifest.version, PINNED_SEMVER);
-});
-
-test("version stays aligned with the other plugin manifests", () => {
- const versions = VERSIONED_MANIFESTS.map((rel) => {
- const manifest = JSON.parse(read(rel));
- assert.match(
- manifest.version,
- PINNED_SEMVER,
- `${rel} version must be pinned semver`,
- );
- return manifest.version;
- });
- const [sharedVersion, ...rest] = versions;
- for (const version of rest) {
- assert.equal(version, sharedVersion);
- }
-});
-
-test("contextFileName resolves to a file carrying the ponytail rules", () => {
- const manifest = loadManifest();
- assert.ok(
- manifest.contextFileName,
- "contextFileName must be set so rules load every session",
- );
- const context = read(manifest.contextFileName);
- for (const phrase of RULE_INVARIANTS) {
- assert.ok(
- context.includes(phrase),
- `context file missing rule invariant: "${phrase}"`,
- );
- }
-});
-
-test("the commands and skills the adapter reuses are present", () => {
- for (const rel of [...REUSED_COMMANDS, ...REUSED_SKILLS]) {
- assert.ok(
- fs.existsSync(path.join(root, rel)),
- `reused file missing: ${rel}`,
- );
- }
-});
diff --git a/.claude/plugins/ponytail/tests/hooks-windows.test.js b/.claude/plugins/ponytail/tests/hooks-windows.test.js
deleted file mode 100644
index 804d08b3..00000000
--- a/.claude/plugins/ponytail/tests/hooks-windows.test.js
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env node
-// Regression test for issue #19: on Windows the lifecycle hooks run via
-// PowerShell, which does NOT expand cmd.exe-style %VAR% — it needs $env:VAR.
-// The hook also has to point at a script that actually ships in hooks/.
-// This guards both failure modes: the original %CLAUDE_PLUGIN_ROOT% bug, and
-// the "switch to a .ps1 that doesn't exist" mistake.
-
-const test = require("node:test");
-const assert = require("node:assert/strict");
-const fs = require("fs");
-const path = require("path");
-
-const root = path.join(__dirname, "..");
-const HOOKS_JSON = "hooks/hooks.json";
-// cmd.exe variable syntax (%FOO%); PowerShell leaves it literal, breaking the path.
-const CMD_VAR_SYNTAX = /%[A-Za-z_][A-Za-z0-9_]*%/;
-// Pull the hooks/<script> a command launches, so we can check it exists.
-const HOOK_SCRIPT = /hooks[\\/]([\w.-]+\.(?:js|mjs|cjs|ps1|sh))/;
-
-// Read inside each case so a missing/malformed file fails as a clean assertion,
-// not a load-time crash.
-function commandHooks() {
- const config = JSON.parse(
- fs.readFileSync(path.join(root, HOOKS_JSON), "utf8"),
- );
- return Object.values(config.hooks)
- .flat()
- .flatMap((entry) => entry.hooks);
-}
-
-test("every commandWindows uses PowerShell $env: syntax, not cmd.exe %VAR%", () => {
- const windowsCommands = commandHooks()
- .map((h) => h.commandWindows)
- .filter(Boolean);
- assert.ok(
- windowsCommands.length > 0,
- "expected at least one commandWindows entry",
- );
- for (const cmd of windowsCommands) {
- assert.doesNotMatch(
- cmd,
- CMD_VAR_SYNTAX,
- `commandWindows uses cmd.exe %VAR% (breaks under PowerShell): ${cmd}`,
- );
- }
-});
-
-test("every hook command points at a script that ships in hooks/", () => {
- for (const hook of commandHooks()) {
- for (const cmd of [hook.command, hook.commandWindows].filter(Boolean)) {
- const match = cmd.match(HOOK_SCRIPT);
- assert.ok(match, `cannot find a hooks/ script in command: ${cmd}`);
- const script = path.join(root, "hooks", match[1]);
- assert.ok(
- fs.existsSync(script),
- `command references a missing hook script: ${match[1]}`,
- );
- }
- }
-});
diff --git a/.claude/plugins/ponytail/tests/hooks.test.js b/.claude/plugins/ponytail/tests/hooks.test.js
deleted file mode 100644
index 06e7fdea..00000000
--- a/.claude/plugins/ponytail/tests/hooks.test.js
+++ /dev/null
@@ -1,148 +0,0 @@
-#!/usr/bin/env node
-
-const assert = require("assert");
-const fs = require("fs");
-const os = require("os");
-const path = require("path");
-const { spawnSync } = require("child_process");
-
-const root = path.join(__dirname, "..");
-
-function run(script, env, input = "") {
- return spawnSync(process.execPath, [path.join(root, "hooks", script)], {
- env: { ...process.env, ...env },
- input,
- encoding: "utf8",
- });
-}
-
-// Keep the base env clean so the default-dir checks are deterministic; the
-// CLAUDE_CONFIG_DIR case sets it explicitly.
-delete process.env.CLAUDE_CONFIG_DIR;
-
-const temp = fs.mkdtempSync(path.join(os.tmpdir(), "ponytail-hooks-"));
-const home = path.join(temp, "home");
-const pluginData = path.join(temp, "plugin-data");
-fs.mkdirSync(home, { recursive: true });
-
-// USERPROFILE alongside HOME: os.homedir() reads USERPROFILE on Windows, HOME on POSIX.
-const codexEnv = {
- HOME: home,
- USERPROFILE: home,
- PLUGIN_DATA: pluginData,
- PONYTAIL_DEFAULT_MODE: "ultra",
-};
-const codexState = path.join(pluginData, ".ponytail-active");
-
-let result = run("ponytail-activate.js", codexEnv);
-assert.equal(result.status, 0, result.stderr);
-assert.equal(fs.readFileSync(codexState, "utf8"), "ultra");
-let output = JSON.parse(result.stdout);
-assert.equal(output.systemMessage, "PONYTAIL:ULTRA");
-assert.match(
- output.hookSpecificOutput.additionalContext,
- /PONYTAIL MODE ACTIVE — level: ultra/,
-);
-
-result = run(
- "ponytail-mode-tracker.js",
- codexEnv,
- JSON.stringify({ prompt: "@ponytail lite" }),
-);
-assert.equal(result.status, 0, result.stderr);
-assert.equal(fs.readFileSync(codexState, "utf8"), "lite");
-output = JSON.parse(result.stdout);
-assert.equal(output.systemMessage, "PONYTAIL:LITE");
-
-result = run(
- "ponytail-mode-tracker.js",
- codexEnv,
- JSON.stringify({ prompt: "normal mode" }),
-);
-assert.equal(result.status, 0, result.stderr);
-assert.equal(fs.existsSync(codexState), false);
-output = JSON.parse(result.stdout);
-assert.equal(output.systemMessage, "PONYTAIL:OFF");
-
-const claudeEnv = {
- HOME: home,
- USERPROFILE: home,
- PONYTAIL_DEFAULT_MODE: "full",
-};
-delete claudeEnv.PLUGIN_DATA;
-
-result = run("ponytail-activate.js", claudeEnv);
-assert.equal(result.status, 0, result.stderr);
-assert.equal(
- fs.readFileSync(path.join(home, ".claude", ".ponytail-active"), "utf8"),
- "full",
-);
-
-// CLAUDE_CONFIG_DIR overrides ~/.claude for the flag file (issue #34).
-const home2 = path.join(temp, "home2");
-fs.mkdirSync(home2, { recursive: true });
-const customConfigDir = path.join(temp, "custom-claude");
-result = run("ponytail-activate.js", {
- HOME: home2,
- USERPROFILE: home2,
- CLAUDE_CONFIG_DIR: customConfigDir,
- PONYTAIL_DEFAULT_MODE: "lite",
-});
-assert.equal(result.status, 0, result.stderr);
-assert.equal(
- fs.readFileSync(path.join(customConfigDir, ".ponytail-active"), "utf8"),
- "lite",
-);
-assert.equal(
- fs.existsSync(path.join(home2, ".claude", ".ponytail-active")),
- false,
- "flag must not land in ~/.claude when CLAUDE_CONFIG_DIR is set",
-);
-
-const copilotData = path.join(temp, "copilot-data");
-const codexData = path.join(temp, "codex-data-shadow");
-result = run("ponytail-activate.js", {
- HOME: home,
- USERPROFILE: home,
- COPILOT_PLUGIN_DATA: copilotData,
- PLUGIN_DATA: codexData,
- PONYTAIL_DEFAULT_MODE: "full",
-});
-assert.equal(result.status, 0, result.stderr);
-assert.equal(
- fs.readFileSync(path.join(copilotData, ".ponytail-active"), "utf8"),
- "full",
-);
-assert.equal(
- fs.existsSync(path.join(codexData, ".ponytail-active")),
- false,
- "copilot hooks must not write mode state to codex PLUGIN_DATA",
-);
-output = JSON.parse(result.stdout);
-assert.match(output.additionalContext, /PONYTAIL MODE ACTIVE — level: full/);
-
-result = run(
- "ponytail-mode-tracker.js",
- {
- HOME: home,
- USERPROFILE: home,
- COPILOT_PLUGIN_DATA: copilotData,
- PLUGIN_DATA: codexData,
- },
- JSON.stringify({ prompt: "/ponytail ultra" }),
-);
-assert.equal(result.status, 0, result.stderr);
-assert.equal(
- fs.readFileSync(path.join(copilotData, ".ponytail-active"), "utf8"),
- "ultra",
-);
-assert.equal(
- fs.existsSync(path.join(codexData, ".ponytail-active")),
- false,
- "copilot mode tracker must keep codex PLUGIN_DATA untouched",
-);
-output = JSON.parse(result.stdout);
-assert.deepEqual(output, {});
-
-fs.rmSync(temp, { recursive: true, force: true });
-console.log("hook compatibility checks passed");
diff --git a/.claude/plugins/ponytail/tests/openclaw-skills.test.js b/.claude/plugins/ponytail/tests/openclaw-skills.test.js
deleted file mode 100644
index e6fd0886..00000000
--- a/.claude/plugins/ponytail/tests/openclaw-skills.test.js
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env node
-// The OpenClaw skill package (.openclaw/skills/) is generated from skills/ by
-// scripts/build-openclaw-skills.js. These tests fail if the committed copies are
-// stale (ruleset drift) or if a description breaks OpenClaw's one-line <160 rule.
-
-const test = require("node:test");
-const assert = require("node:assert/strict");
-const fs = require("fs");
-const {
- NAMES,
- render,
- outPath,
- sourceBody,
- DESCRIPTIONS,
-} = require("../scripts/build-openclaw-skills");
-
-for (const name of NAMES) {
- test(`${name}: committed OpenClaw skill matches the generator`, () => {
- const onDisk = fs
- .readFileSync(outPath(name), "utf8")
- .replace(/\r\n/g, "\n");
- assert.equal(
- onDisk,
- render(name),
- "stale — run: node scripts/build-openclaw-skills.js",
- );
- });
-
- test(`${name}: body is the canonical skills/${name} body, verbatim`, () => {
- const onDisk = fs
- .readFileSync(outPath(name), "utf8")
- .replace(/\r\n/g, "\n");
- assert.ok(
- onDisk.endsWith(sourceBody(name)),
- "body drifted from skills/" + name,
- );
- });
-
- test(`${name}: description is one line under 160 chars`, () => {
- const d = DESCRIPTIONS[name];
- assert.ok(
- d.length <= 160 && !d.includes("\n"),
- "description too long or multiline",
- );
- });
-}
diff --git a/.claude/plugins/ponytail/tests/opencode-plugin.test.js b/.claude/plugins/ponytail/tests/opencode-plugin.test.js
deleted file mode 100644
index 53ad31a4..00000000
--- a/.claude/plugins/ponytail/tests/opencode-plugin.test.js
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/usr/bin/env node
-// Smoke test for the OpenCode adapter: the plugin's hooks behave against the
-// real (structural) OpenCode hook shapes. No live OpenCode needed.
-
-const test = require("node:test");
-const assert = require("node:assert/strict");
-const fs = require("fs");
-const os = require("os");
-const path = require("path");
-const { pathToFileURL } = require("url");
-
-// Point the plugin's mode-flag at a temp config home BEFORE it loads — the
-// plugin resolves its state path once at load (as it does under a real OpenCode
-// process, where XDG_CONFIG_HOME is already set). The dynamic import below runs
-// after this assignment, so the ordering holds.
-const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "ponytail-opencode-"));
-process.env.XDG_CONFIG_HOME = tmp;
-delete process.env.PONYTAIL_DEFAULT_MODE;
-const statePath = path.join(tmp, "opencode", ".ponytail-active");
-
-let loadPlugin;
-test.before(async () => {
- const url = pathToFileURL(
- path.join(__dirname, "..", ".opencode", "plugins", "ponytail.mjs"),
- );
- loadPlugin = (await import(url)).default;
-});
-
-function transform(hooks) {
- const output = { system: [] };
- return hooks["experimental.chat.system.transform"](
- { model: {} },
- output,
- ).then(() => output.system);
-}
-
-test("system.transform injects the ruleset at the default mode (full)", async () => {
- try {
- fs.unlinkSync(statePath);
- } catch (e) {}
- const hooks = await loadPlugin({});
- const system = await transform(hooks);
- assert.equal(system.length, 1);
- assert.match(system[0], /PONYTAIL MODE ACTIVE — level: full/);
- assert.match(system[0], /lazy senior developer/);
-});
-
-test("command.execute.before persists /ponytail ultra, transform follows it", async () => {
- const hooks = await loadPlugin({});
- await hooks["command.execute.before"]({
- command: "ponytail",
- arguments: "ultra",
- sessionID: "s",
- });
- assert.equal(fs.readFileSync(statePath, "utf8"), "ultra");
- const system = await transform(hooks);
- assert.match(system[0], /PONYTAIL MODE ACTIVE — level: ultra/);
-});
-
-test("/ponytail off persists off and transform injects nothing", async () => {
- const hooks = await loadPlugin({});
- await hooks["command.execute.before"]({
- command: "ponytail",
- arguments: "off",
- sessionID: "s",
- });
- assert.equal(fs.readFileSync(statePath, "utf8"), "off");
- const system = await transform(hooks);
- assert.deepEqual(system, []);
-});
-
-test("unrelated commands do not touch the flag", async () => {
- try {
- fs.unlinkSync(statePath);
- } catch (e) {}
- const hooks = await loadPlugin({});
- await hooks["command.execute.before"]({
- command: "commit",
- arguments: "x",
- sessionID: "s",
- });
- assert.equal(fs.existsSync(statePath), false);
-});
-
-test.after(() => fs.rmSync(tmp, { recursive: true, force: true }));
diff --git a/.claude/settings.json b/.claude/settings.json
index a54b99d8..3bdf3bc4 100644
--- a/.claude/settings.json
+++ b/.claude/settings.json
@@ -1,7 +1,6 @@
{
"extraKnownMarketplaces": {},
"enabledPlugins": {
- "ponytail@ponytail": true,
"context7@claude-plugins-official": false,
"playwright@claude-plugins-official": false,
"security-guidance@claude-plugins-official": false,
@@ -26,6 +25,31 @@
"pr": ""
},
"hooks": {
+ "SessionStart": [
+ {
+ "matcher": "startup|resume|clear|compact",
+ "hooks": [
+ {
+ "type": "command",
+ "command": "command -v node >/dev/null 2>&1 && node \"$CLAUDE_PROJECT_DIR/.claude/hooks/ponytail-activate.js\" || exit 0",
+ "timeout": 5,
+ "statusMessage": "Loading ponytail mode..."
+ }
+ ]
+ }
+ ],
+ "UserPromptSubmit": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "command -v node >/dev/null 2>&1 && node \"$CLAUDE_PROJECT_DIR/.claude/hooks/ponytail-mode-tracker.js\" || exit 0",
+ "timeout": 5,
+ "statusMessage": "Tracking ponytail mode..."
+ }
+ ]
+ }
+ ],
"PreToolUse": [
{
"matcher": "Bash|Read|Grep|Glob|SendMessage",
diff --git a/.claude/plugins/ponytail/skills/ponytail-audit/SKILL.md b/.claude/skills/ponytail-audit/SKILL.md
similarity index 100%
rename from .claude/plugins/ponytail/skills/ponytail-audit/SKILL.md
rename to .claude/skills/ponytail-audit/SKILL.md
diff --git a/.claude/plugins/ponytail/skills/ponytail-debt/SKILL.md b/.claude/skills/ponytail-debt/SKILL.md
similarity index 100%
rename from .claude/plugins/ponytail/skills/ponytail-debt/SKILL.md
rename to .claude/skills/ponytail-debt/SKILL.md
diff --git a/.claude/plugins/ponytail/skills/ponytail-help/SKILL.md b/.claude/skills/ponytail-help/SKILL.md
similarity index 100%
rename from .claude/plugins/ponytail/skills/ponytail-help/SKILL.md
rename to .claude/skills/ponytail-help/SKILL.md
diff --git a/.claude/plugins/ponytail/skills/ponytail-review/SKILL.md b/.claude/skills/ponytail-review/SKILL.md
similarity index 100%
rename from .claude/plugins/ponytail/skills/ponytail-review/SKILL.md
rename to .claude/skills/ponytail-review/SKILL.md
diff --git a/.claude/plugins/ponytail/skills/ponytail/SKILL.md b/.claude/skills/ponytail/SKILL.md
similarity index 100%
rename from .claude/plugins/ponytail/skills/ponytail/SKILL.md
rename to .claude/skills/ponytail/SKILL.md
diff --git a/CLAUDE.md b/CLAUDE.md
index b0e6ebf2..10eff174 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -36,7 +36,7 @@ The `agent-team` skill is the single source of truth for team layout and cross-a
Only **developer** runs on opus; everything else is sonnet or haiku.
-The **developer** and **simple-developer** apply the **Ponytail** minimization ladder (full mode) on every change, via inline directives in their prompts. The plugin (`ponytail@ponytail`) is vendored in-repo at `.claude/plugins/ponytail/` and enabled via `enabledPlugins` in `.claude/settings.json`; its local-directory marketplace is registered per-machine in the git-ignored `.claude/settings.local.json` (the path is absolute because Claude Code does not resolve relative marketplace paths — anthropics/claude-code#23978 — so each clone registers it once with `/plugin marketplace add ./.claude/plugins/ponytail`). It also provides orchestrator-level guidance and the manual `/ponytail*` skills — but its `SessionStart` / `UserPromptSubmit` hooks reach only the main session, NOT `Agent`-dispatched subagents, which is why the dev agents get the ladder inline rather than from the plugin.
+The **developer** and **simple-developer** apply the **Ponytail** minimization ladder (full mode) on every change, via inline directives in their prompts. Ponytail is installed **natively** in-repo (no plugin or marketplace): its skills live in `.claude/skills/ponytail*`, its `/ponytail*` commands in `.claude/commands/`, and its `SessionStart` / `UserPromptSubmit` hooks are wired in `.claude/settings.json` to `.claude/hooks/ponytail-*.js` (CommonJS scripts — `.claude/hooks/package.json` pins them to `commonjs` since the repo is an ESM package). It provides orchestrator-level guidance and the manual `/ponytail*` commands — but those `SessionStart` / `UserPromptSubmit` hooks reach only the main session, NOT `Agent`-dispatched subagents, which is why the dev agents get the ladder inline rather than from the hooks.
## The orchestrator's job between hand-offs