Repository navigation
shepard: leave the code simpler, and think the fix through before pushing - #45
Merged
Merged
Conversation
The stop rule was "three rounds on the same seam", judged by the agent that sees every finding as new. On a corpus of 446 review findings it never fired while PRs ran 8, 9 and 12 rounds. Over half the findings filed in round 2 or later sat on a file that already had a finding. Now the skill counts instead of judging: - Step 1 lists the bug classes already fixed, from `Class:` lines in the branch's commits. A class at its second site is a design call. - Step 3 names the bug class of every finding and sweeps the diff for twins. - Step 4 fixes every twin in the diff in one push. A fix that adds state carries a transition table. - Step 5 adds a third option: fix the construct in this PR. It must shrink the state space. - Step 7 adds a `Class:` line to every review-fix commit. The reference template gets a Hazards section. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AiJB5Aakjd3rGcm6jdNf3y
A replay of 13 long review chains (kendo, emmie, lokalekeuze, crit) showed the bug-class stop rules would save about 7-30 of 144 rounds, and fire falsely about half the time. The old process already stopped at the same rounds. What kept the chains going was the next fix: about half the later findings sat inside the previous fix. This reverts the previous commit and keeps two rules in step 4: - Leave the code simpler, not the diff smaller. - Think the fix through before you push it. Step 5 now recommends the fix shape that leaves less state. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AiJB5Aakjd3rGcm6jdNf3y
bjvle
added a commit
that referenced
this pull request
Oct 2, 2026
$.state is the session's, and a /clear starts a new session, so the marker session.end wrote was gone at the next prompt: the first live /clear delivered nothing (finding #45). The marker now lives in $.store under a random key each fresh process mints in session.start and keeps in its own environment, which outlasts a /clear and a hot reload. $.state tells a fresh process (a child claude inherits the env) from a reload. prompt.submit now writes a debug line either way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bjvle
added a commit
that referenced
this pull request
Oct 2, 2026
…arker The handoff reached the first prompt after a live /clear: session.end stored lastClear:<key>, prompt.submit delivered it with a GATE line, and the handoff is now consumed. Finding #45 gets the retest, D32 and the CHANGELOG drop it from the unmeasured list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
We measured the patching problem before settling on a change. Four auditors replayed 13 long review chains in kendo, emmie, lokalekeuze and crit: 144 crit rounds, and 230 findings filed in round 2 or later. They tested a set of stop rules against them: a "same bug class at a second site" stop, a blame check, a per-file round counter, and a sweep for twins.
The stop rules would have saved about 7–30 of the 144 rounds, and they fired falsely about half the time. Detection was not the gap. In every repo, the old process already stopped at about the same rounds. What decided the outcome was the fix that came next:
So this PR drops the stop rules and changes only how a fix is made.
What
skills/shepard/SKILL.md, steps 4 and 5 only:The branch's first commit added the stop rules, a
Class:commit line and a Hazards section in the template. The second commit reverts all of that. The net diff againstmainis only the three points above.Not in this PR
/shepard..claude/skills/shepard. It needs the same change after this merges.🤖 Generated with Claude Code
https://claude.ai/code/session_01AiJB5Aakjd3rGcm6jdNf3y