feat(review): let a project say what it reviews against - #19
Merged
Conversation
Findings now survive commits, so their line numbers go stale as soon as the code under them shifts. anchor_content already recorded the lines a comment was attached to, but nothing used it, and the agent CLI never filled it in - only comments written in the browser had one. `agent comment` now records the anchor, and carrying a session forward re-anchors every open thread on the new side: the exact lines are located in the working tree and the thread moves to them. The match is exact. A line that was edited is a different line, and guessing at similarity would move a comment onto code it was not written about - such a thread keeps its old position instead. When the same lines appear more than once, the occurrence nearest to where the comment used to be wins. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018PkYQzbsnMihHesafWvXKs
The review skill carried its own severity labels and its own idea of a good review, so a project's actual standards - which usually already exist as a document in the repository - had no way to reach the reviewer. `.diffity.json` gains a review section: severities, the labels findings are prefixed with, and standards, a repository-relative path to the project's own standards document. `diffity agent standards` prints both, and the path is read through the repository containment check. The review skill now reads that first and treats it as outranking its own guidance, uses the project's labels, and finishes by recording a reading order so the diff opens in the order it should be read rather than alphabetically. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018PkYQzbsnMihHesafWvXKs
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.
The other half of the own-PR workflow: a review is only as good as the standards it is held to, and
the skill was carrying its own — its own severity labels, its own idea of what matters. Most projects
already have a standards document in the repository; nothing connected the two.
.diffity.jsongains areviewsection:{ "review": { "severities": ["P1", "P2", "P3"], "standards": ".claude/skills/code-review/SKILL.md" } }severities— the labels findings are prefixed with, most severe first. Defaults toP1/P2/P3standards— a repository-relative path to the project's own standards, read through the containment check from fix(tree): keep file reads inside the repository #11diffity agent standards [--json]prints both, so a skill gets them in one callThe
diffity-reviewskill now reads that first and treats it as outranking its own guidance,prefixes findings with the project's labels, and — new — finishes by recording a reading order with
tour-start/tour-step/tour-done, so the diff opens in the order it should be read instead ofalphabetically. Which means one command now produces the whole thing: findings, severities the team
recognises, and a walkthrough.
Verified against a scratch repository: defaults with no config, configured labels and document,
the JSON shape a skill consumes, and a
standardspath pointing outside the repository beingrefused rather than read.
Nothing NaturalCycles-specific is in the code or the skill — the vocabulary and the document are
configuration, which is what keeps this upstreamable.
Stacked on #18.
🤖 Generated with Claude Code
https://claude.ai/code/session_018PkYQzbsnMihHesafWvXKs