Components / / Oleg / Blog / review-findings-into-verified-fixes

· 7 min read · Quality

Six lines got past the author. A seventh now fails CI.

A review found six lines in our shared Claude Code skills that only worked on one person's setup. Fixing them as written would have been wrong twice. What worked: challenge every finding, fix the cause, then put the bug back and watch the check go red.

We keep our Claude Code skills as plain files in a shared repo, and a team installs one by copying its folder. Copying has one weak point. A line that names one person’s setup, like a path into my home folder or the name of one app repo, breaks the skill for everyone else.

While we wrote the first seven skills, six of those lines reached the pull request. I didn’t see them. A review did.

The obvious next move is to fix all six. That turned out to be wrong, and so was the review.

A finding is a claim

A review comment can be wrong. So can an issue from a review bot, and so can a plan. An agent that fixes every finding as written also fixes the wrong ones, and a coding agent learns a codebase by reading it, so a wrong fix becomes the example for the next change.

I saw how often on our own work. A retro on our agent setup listed 8 improvement candidates. I gave all 8 to a refuter, an agent whose only job is to disprove them. It rejected 3 with evidence. One said a rule lived in one folder; it was in three. One gave a count of 2; the real count was 3. One cited two examples that didn’t exist. A fourth was already handled.

Findings14
Should not change6
Changes made14
Grey is claims that were wrong or already handled, light blue is lines kept on purpose, dark blue is work that needed doing. Hover a bar for its count.

Fixing as written makes 14 changes where 8 were needed, and two of the extra ones delete something useful.

The refuter works because it has no stake. It starts in a fresh context and gets one line per claim: the claim, the file and line, and where the evidence lives. It never sees why anyone believes the claim. A reviewer that has just argued its way to a finding tends to keep it, and a model does that as much as a person.

It returns one verdict per claim. CONFIRMED means the evidence shows it. PLAUSIBLE means it’s likely but rests on context the refuter can’t see, and it names that context. REFUTED means it quotes the evidence against it.

For the six lines, the claim was “this line is not portable”. It held for four. The other two named our setup on purpose, after “such as”, as examples. Fix all six and you lose two useful examples.

Who checks the checker

A refuter is one more agent, so it gets the same treatment. It runs as a sub-agent with no Edit or Write tool. Its shell can still write, so the skill saves git status before the run and compares after. When a command settles a claim, the refuter reports the command and its exit code, and a script runs it again. A proof that doesn’t repeat drops the claim to PLAUSIBLE.

For high stakes there’s a second refuter on a different model, with the same brief. One model has the author’s training and can miss what the author missed. When the two disagree, the claim is DISPUTED and the report shows both sides.

Then one rule decides what gets fixed, and it lives in exactly one place. Fix a confirmed finding that changes behaviour. Report a style finding and leave the code. Every skill that fixes findings points at that rule instead of keeping its own copy.

So the four lines got fixed and the two examples stayed. That handled six lines and left the cause in place. Nothing stopped line seven.

Climb the ladder

A fix removes one bug. A guard removes the class: every bug with the same cause. The first step is to write the class as one sentence that names the cause, not the symptom. Ours: a copied skill breaks for another team whenever a skill file can name one person’s setup.

Then pick a guard. The skill climbs a ladder from the top and takes the first rung that covers every site.

Seven rungs from strongest to weakest: remove, unrepresentable, one owner, static check, hook or CI job, test, doc. Beside them, the probe: reintroduce the bug, run the check, expect red at the probe line, revert.
The order is about when the mistake gets caught. At the top, nobody can write it. At the bottom, a reader can skip it.

Nothing near the top fit text in a markdown file, so the guard is a pattern search in CI. When a pull request touches the skills folder, a script searches it and prints each hit as path:line: not portable.

The two examples need a way through, so an allow file lists them. An allow list is a bypass, and a bypass grows. So an entry that matches no line also fails the step. A stale entry can’t stay.

Put the bug back

A guard nobody has seen fail is an assumption. The pattern can cover the wrong folder. The test can assert something that was already true.

So the last step puts the bug back on purpose. I appended a line that names an org to a skill file and ran the check:

$ echo 'Outside the acme org, wait.' >> skills/review/SKILL.md
$ ./check-skills.sh; echo "exit $?"
skills/review/SKILL.md:38: not portable: Outside the acme org, wait.
Make each flagged line generic, or add it to the allow file as an example.
exit 1

Red, at the probe line, with a message that says what to do. Without the probe it prints nothing and exits 0. A red for another reason, like a syntax error in the probe, doesn’t count. A probe that stays green means the rung doesn’t hold, and you pick again.

The same proof ran on a Claude Code hook built with this skill. With the probe in, 16 of its 52 test cases went red. After the revert, all 52 passed.

One more skill points the same ladder at the agents. Each week it takes their most common mistake and turns it into a guard with a probe.

Lesson

Challenge a finding before you fix it, then fix the cause instead of the line. A correction in a conversation lasts until the conversation ends. A check lasts until someone deletes it, and you only trust it after you’ve watched it go red.