Skip to content

Add Smallest complete change rule to /go - #267

Merged
haacked merged 5 commits into
mainfrom
haacked/go-smallest-change
Oct 29, 2026
Merged

haacked merged 5 commits into
mainfrom
haacked/go-smallest-change

Conversation

@haacked

@haacked haacked commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

/go doesn't tell its implementers to prefer the smallest change that fully works. They sometimes hand-roll what the standard library or the codebase already has, or add options nobody asked for. The Ponytail skill targets this, and JetBrains measured it independently at 10% lower cost and 15% less code across 80 paired tasks with no quality difference. I didn't want the plugin itself, though. It injects its rules into every subagent, code reviewers included, and writes a per-task ledger by default.

This adds a Smallest complete change rule to /go's Implement step, adapted from Ponytail's ladder. It leaves out Ponytail's testing, comment, and end-of-reply rules, because unit-test-writer, comment-cleanup, and the ## Flagged calls list already handle those. The single pass follows the rule, and the stage loop passes it to each stage implementer with the judgment-call rule. The test writer and review-code --fix agents get neither.

I also ran a small claude plugin eval comparison (3 cases, 3 runs per arm). Every hidden test passed with and without the rule, and code size and cost came out about even. The cases turned out too easy to show Ponytail's effect, so I left the eval out of this PR.

Test plan

  • Skill spec, canonical, and portable skill tests pass
  • The eval comparison found no correctness cost from the rule
  • Watch the first few /go runs for a ## Flagged calls list padded with trivial omissions from the rule's "flag each one left out" step

https://claude.ai/code/session_01AovXvYri48wFhqGV3epaMi

/go's single pass follows the rule, and the stage loop passes it to each
stage implementer alongside the judgment-call rule. review-code --fix
agents still get neither.

ai/evals/smallest-change is an eval-only plugin for `claude plugin eval`.
The with arm loads a SessionStart hook that prints rule.md, a copy of the
rule that ai/tests/test-eval-rule-sync.sh keeps in sync. The without arm
is the tool's no-plugin baseline, so the rule is the only difference.
Three scaffolded Python cases grade with hidden tests, a production-line
limit, a dependency check, and (in two cases) a check that the change
uses the stdlib module or existing helper.

Claude-Session: https://claude.ai/code/session_01AovXvYri48wFhqGV3epaMi
Judgment calls and Smallest complete change go to the single pass and
each stage implementer only. The test writer and review-code --fix
agents get neither.

Claude-Session: https://claude.ai/code/session_01AovXvYri48wFhqGV3epaMi
claude plugin eval ignores the workspace's .claude/settings.json, and its
no-plugin ablation arm drops every plugin, so neither can grade the
baseline. run.sh runs two single-arm evals instead: this plugin, whose
hooks print the rule and grade the workspace, and a baseline plugin it
builds from a copy of the cases and the grading hook alone. compare.py
prints each grader's pass count in both arms.

Claude-Session: https://claude.ai/code/session_01AovXvYri48wFhqGV3epaMi
Each case now has a grader per size limit (5, 10, 20, and 40 production
lines), so the pass counts show roughly how many lines each arm changed.
retry-reuse replaces permalink-reuse, which both arms passed every time:
it asks for webhook retries in a codebase that already has a retry
helper.

Claude-Session: https://claude.ai/code/session_01AovXvYri48wFhqGV3epaMi
@haacked
haacked marked this pull request as ready for review October 29, 2026 01:40
@haacked haacked changed the title Add Smallest complete change rule to /go, with eval cases Add Smallest complete change rule to /go Oct 29, 2026
@haacked
haacked merged commit 98e2c15 into main Oct 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant