Repository navigation
skills(review): cite code outside the diff by semantic anchor - #477
Merged
Merged
Conversation
…ne number When the bot's review finding involves code the PR didn't touch (e.g. a selector or function in main that the PR's change now interacts with), leading with a raw line number reads as a hallucination on any contributor branch that's behind main — the merged-tree line numbers won't match their stale local checkout. Adds a step-4 subsection telling the bot to anchor citations of outside-the-diff code by selector/function/declaration text, and quote enough property/value that the reader can grep for it. Cross-references the existing `blob/main/...#L42` link-fragility rule in `running-in-ci` — same shifting-line-number problem, opposite direction. Co-Authored-By: Claude <[email protected]>
tend-agent
approved these changes
May 14, 2026
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.
Adds a step-4 rule in the review skill: when a finding involves code outside
gh pr diff(i.e. code the PR didn't touch but now interacts with), identify it by semantic anchor (selector, function name, declaration text) rather than raw line number, and quote enough property/value that the reader can grep for it.Why:
tend-reviewchecks outrefs/pull/N/merge, so it reads the merged tree. The contributor's local branch may be behind main, so line numbers from the merged tree won't match their local checkout. A line-number-first citation of code that only exists at that line in main reads as a hallucination — the contributor checks the cited line, sees different content, and dismisses the review. Happened in #475, where the reviewer correctly flagged that the new5.5remrail desynchronized three6remindents in.hero,.section-eyebrow, and.section-lead; I posted a (wrong, since-deleted) rebuttal based on a stale local checkout before realizing my branch was significantly behind main.Why this framing, not a blanket caveat: every review can't open with "your branch may be behind main." The trigger is specific — the citation is outside the diff — so the rule fires narrowly. Findings inside the diff don't need it.
Cross-reference:
running-in-ci:352already says outboundblob/main/...#L42links must use a commit SHA because line numbers shift. This is the inbound dual: don't lead with a line number when citing code that may have moved.