polish-diff
Polish Diff
Four cleanup agents read the diff from four angles, then you apply what they find. The deliverable is cleaner code that behaves identically — not a report, and not a bug fix.
Two boundaries define this skill, and both are load-bearing:
1. Pin the diff — fail fast
Run git diff @{upstream}...HEAD (falling back to git diff main...HEAD, then git diff HEAD~1) to get the diff under review. If there are uncommitted changes, or the range diff comes back empty, also run git diff HEAD and fold the working tree into scope — polish-diff usually runs before the commit. A PR number, branch, or file path passed as an argument replaces all of this. An empty diff stops here and says so; it never becomes four agents reviewing nothing. Done when: the diff is non-empty and its scope is named.
2. Record the green baseline
Find and run the suite covering the changed files, and record the result before touching anything. Green is the baseline you must reproduce in step 6. Red here means the branch is already broken — stop and name root-cause; polishing on top of a failing suite destroys the only evidence that your cleanup preserved behavior. Done when: the suite is green and the command that proved it is written down.