From cbb8859f39ec0962999335de9ab5ec501569ab47 Mon Sep 17 00:00:00 2001 From: dgebert Date: Fri, 12 Jun 2026 12:11:47 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20skill=20v4=20=E2=80=94=20test=20reflex,?= =?UTF-8?q?=20ceiling=20comments,=20robust-variant=20rule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hardening per the A-F benchmark brief: non-trivial logic leaves one runnable check; ponytail: comments on ceiling-bearing shortcuts name the ceiling and upgrade path; prefer the edge-case-correct stdlib option at equal size. Applied to SKILL.md, all cross-agent rule copies, the hook fallback, and a guard line in ponytail-review. Co-Authored-By: Claude Fable 5 --- .clinerules/ponytail.md | 5 +++-- .cursor/rules/ponytail.mdc | 5 +++-- .github/copilot-instructions.md | 5 +++-- .windsurf/rules/ponytail.md | 5 +++-- AGENTS.md | 5 +++-- hooks/ponytail-activate.js | 6 ++++-- skills/ponytail-review/SKILL.md | 4 +++- skills/ponytail/SKILL.md | 9 ++++++++- 8 files changed, 30 insertions(+), 14 deletions(-) diff --git a/.clinerules/ponytail.md b/.clinerules/ponytail.md index bb653d8..25ac390 100644 --- a/.clinerules/ponytail.md +++ b/.clinerules/ponytail.md @@ -18,6 +18,7 @@ Rules: - 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?" -- Mark intentional simplifications with a `ponytail:` comment. +- 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, anything explicitly requested. +Not lazy about: input validation at trust boundaries, error handling that prevents data loss, security, accessibility, anything explicitly requested. 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/.cursor/rules/ponytail.mdc b/.cursor/rules/ponytail.mdc index 3ed0114..ca641ba 100644 --- a/.cursor/rules/ponytail.mdc +++ b/.cursor/rules/ponytail.mdc @@ -24,6 +24,7 @@ Rules: - 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?" -- Mark intentional simplifications with a `ponytail:` comment. +- 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, anything explicitly requested. +Not lazy about: input validation at trust boundaries, error handling that prevents data loss, security, accessibility, anything explicitly requested. 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/.github/copilot-instructions.md b/.github/copilot-instructions.md index bb653d8..25ac390 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -18,6 +18,7 @@ Rules: - 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?" -- Mark intentional simplifications with a `ponytail:` comment. +- 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, anything explicitly requested. +Not lazy about: input validation at trust boundaries, error handling that prevents data loss, security, accessibility, anything explicitly requested. 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/.windsurf/rules/ponytail.md b/.windsurf/rules/ponytail.md index bb653d8..25ac390 100644 --- a/.windsurf/rules/ponytail.md +++ b/.windsurf/rules/ponytail.md @@ -18,6 +18,7 @@ Rules: - 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?" -- Mark intentional simplifications with a `ponytail:` comment. +- 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, anything explicitly requested. +Not lazy about: input validation at trust boundaries, error handling that prevents data loss, security, accessibility, anything explicitly requested. 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/AGENTS.md b/AGENTS.md index 2aedcfe..66526ea 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -18,8 +18,9 @@ Rules: - 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?" -- Mark intentional simplifications with a `ponytail:` comment. +- 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, anything explicitly requested. +Not lazy about: input validation at trust boundaries, error handling that prevents data loss, security, accessibility, anything explicitly requested. 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/hooks/ponytail-activate.js b/hooks/ponytail-activate.js index 6593679..777b5a3 100644 --- a/hooks/ponytail-activate.js +++ b/hooks/ponytail-activate.js @@ -110,13 +110,15 @@ if (skillContent) { 'No abstractions that were not requested. No avoidable dependencies. No boilerplate nobody asked for. ' + 'Deletion over addition. Boring over clever. Fewest files possible. ' + 'Ship the lazy version and question the complex request in the same response — never stall. ' + - 'Mark intentional simplifications with a `ponytail:` comment.\n\n' + + 'Between two same-size stdlib options, pick the one correct on edge cases. ' + + 'Mark intentional simplifications with a `ponytail:` comment — a shortcut with a known ceiling names the ceiling and the upgrade path in the comment.\n\n' + '## Output\n\n' + 'Code first. Then at most three short lines: what was skipped, when to add it. ' + 'If the explanation is longer than the code, delete the explanation.\n\n' + '## When NOT to be lazy\n\n' + 'Never simplify away: input validation at trust boundaries, error handling that prevents data loss, ' + - 'security measures, accessibility basics, anything the user explicitly asked to keep.\n\n' + + 'security measures, accessibility basics, anything the user explicitly asked to keep. ' + + 'Non-trivial logic leaves ONE runnable check behind (assert-based demo/self-check or one small test file; no frameworks). Trivial one-liners need no test.\n\n' + '## Boundaries\n\n' + 'Ponytail governs what you build, not how you talk. "stop ponytail" or "normal mode": revert. Level persists until changed or session end.'; } diff --git a/skills/ponytail-review/SKILL.md b/skills/ponytail-review/SKILL.md index a623f8b..e6f459d 100644 --- a/skills/ponytail-review/SKILL.md +++ b/skills/ponytail-review/SKILL.md @@ -50,5 +50,7 @@ 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. Does not apply the fixes, only lists them. +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/skills/ponytail/SKILL.md b/skills/ponytail/SKILL.md index df54a3a..198067f 100644 --- a/skills/ponytail/SKILL.md +++ b/skills/ponytail/SKILL.md @@ -46,7 +46,8 @@ higher one and move on. The first lazy solution that works is the right one. - 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. -- Mark deliberate simplifications with a `ponytail:` comment (`// ponytail: this exists`) — simple reads as intent, not ignorance. +- 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 @@ -77,6 +78,12 @@ that prevents data loss, security measures, accessibility basics, anything explicitly requested. User insists on the full version → build it, no re-arguing. +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