#245 "Dangerously lazy": add an operational "fix the root cause, not the symptom" directive — grep every caller of the function you touch and fix the shared function once (the smaller diff). Validated on the agentic benchmark: on a shared-helper bug-fix trap, baseline fixes the root cause 1/6 while ponytail does 6/6 on both Sonnet 4.6 (the model the issue was filed on) and Opus 4.8, verified by reading the produced code. Plain prose ("trace the flow") did not move it; the actionable, lazy-framed directive did. #217 "Missing rung": add ladder rung 2 "Already in this codebase? Reuse it, don't re-write it." Propagated across SKILL.md, AGENTS.md, all agent mirror copies, the hook fallback, and both READMEs (check-rule-copies passes). Benchmark: 4 new deterministic quality-tier tasks (reuse-slug, reuse-money, trace-transfer, trace-amount) with selftest-proven good/bad refs; harness gains multi-file seed support in --selftest, distinctive-behaviour reuse detection, and counts in-file __main__/demo() self-checks as test LOC (not source bloat) for surgical tasks. Full writeup in benchmarks/results/2026-06-22-issue-245-217-comprehension.md. Also carries the in-progress todo-null benchmark task already present in the working tree. Co-authored-by: Dietrich Gebert <dgebert@Dietrichs-MacBook-Pro.local> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Dietrich Gebert
Claude Opus 4.8
parent
6da37bfa7d
commit
dedc97ca7c
@@ -43,13 +43,15 @@ function getFallbackInstructions(mode) {
|
||||
'ACTIVE EVERY RESPONSE. No drift back to over-building. Still active if unsure. Off only: "stop ponytail" / "normal mode".\n\n' +
|
||||
'Current level: **' + mode + '**. Switch: `/ponytail lite|full|ultra`.\n\n' +
|
||||
'## The ladder\n\n' +
|
||||
'Before any code, stop at the first rung that holds:\n' +
|
||||
'Before any code, stop at the first rung that holds (the ladder runs after you understand the problem, not instead of it — read the code it touches and trace the real flow first):\n' +
|
||||
'1. Does this need to be built at all? (YAGNI)\n' +
|
||||
'2. Does the standard library do this? Use it.\n' +
|
||||
'3. Does a native platform feature cover it? Use it.\n' +
|
||||
'4. Does an already-installed dependency solve it? Use it.\n' +
|
||||
'5. Can this be one line? Make it one line.\n' +
|
||||
'6. Only then: write the minimum code that works.\n\n' +
|
||||
'2. Does it already exist in this codebase? Reuse what is already here, do not re-write it.\n' +
|
||||
'3. Does the standard library do this? Use it.\n' +
|
||||
'4. Does a native platform feature cover it? Use it.\n' +
|
||||
'5. Does an already-installed dependency solve it? Use it.\n' +
|
||||
'6. Can this be one line? Make it one line.\n' +
|
||||
'7. Only then: write the minimum code that works.\n\n' +
|
||||
'Bug fix = root cause, not symptom: grep every caller of the function you touch and fix the shared function once (a smaller diff than one guard per caller); patching only the path the ticket names leaves a sibling caller broken.\n\n' +
|
||||
'## Rules\n\n' +
|
||||
'No abstractions that were not requested. No avoidable dependencies. No boilerplate nobody asked for. ' +
|
||||
'Deletion over addition. Boring over clever. Fewest files possible. ' +
|
||||
@@ -61,7 +63,7 @@ function getFallbackInstructions(mode) {
|
||||
'If the explanation is longer than the code, delete the explanation. ' +
|
||||
'Explanation the user explicitly asked for is not debt, give it in full.\n\n' +
|
||||
'## When NOT to be lazy\n\n' +
|
||||
'Never simplify away: input validation at trust boundaries, error handling that prevents data loss, ' +
|
||||
'Never simplify away: understanding the problem (read it fully and trace the real flow before picking a rung — a small diff you do not understand is just laziness dressed up as efficiency), input validation at trust boundaries, error handling that prevents data loss, ' +
|
||||
'security measures, accessibility basics, the calibration real hardware needs (the platform is never the spec ideal), anything the user explicitly asked to keep. ' +
|
||||
'Lazy code without its check is unfinished: 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' +
|
||||
|
||||
Reference in New Issue
Block a user