Repository navigation
fix(agents): delegate code-reviewer persona to code-review-and-quality skill - #427
BryanDhaniel wants to merge 3 commits into
Conversation
addyosmani
left a comment
There was a problem hiding this comment.
I like the instinct here. We do say "don't duplicate content between skills, reference and link instead," and the persona was carrying a near-verbatim copy of the five axes that live in code-review-and-quality. I checked and the skill genuinely is the fuller source (the five axes plus the approval standard), so pointing at it isn't losing anything for someone reading this inside the repo.
The problem is where these persona files actually get used. docs/copilot-setup.md tells people to cp agents/code-reviewer.md .github/agents/code-reviewer.agent.md, and docs/gemini-cli-setup.md says to copy this file's content into other tools. In every one of those flows the persona travels alone, and ../skills/code-review-and-quality/SKILL.md resolves to nothing on the other side. So this trades duplication for a broken link in the persona's main distribution mode. That is the same portability tradeoff we're already tracking in #361, and for a file whose job is to be copied out, self-containment wins over DRY.
So I don't want to take this as-is. If you want to kill the duplication, the persona needs to stay usable standalone, which probably means inlining a compact version of the axes here with a "canonical source: code-review-and-quality" pointer for in-repo readers, rather than replacing the content with a link. Happy to look again if you reshape it that way. Thanks for spotting the duplication, the underlying observation is correct.
…-out Pure link-delegation broke when this persona is copied out standalone (docs/copilot-setup.md, docs/gemini-cli-setup.md both distribute this file alone into other tools' directories), where the relative link to skills/code-review-and-quality/SKILL.md resolves to nothing. Inline a compact version of the five axes instead, with a canonical-source pointer for in-repo readers. Still nearly halves the original duplication (97 -> 74 lines) while keeping the persona usable on its own.
|
I hadn't considered that this persona file gets copied out standalone into other tools (per Worth flagging honestly: this cuts the duplication but doesn't fully eliminate it, the axis descriptions are still hand-maintained in two places, just more concisely now. A complete fix would probably mean generating this section from the skill rather than hand-syncing it, but that felt like a bigger change than this issue called for. Let me know if this looks right. |
federicobartoli
left a comment
There was a problem hiding this comment.
Thanks @BryanDhaniel ! The compact-summary direction is right and the approval standard matches the skill's wording. One required change: the canonical-source pointer must survive standalone copies (GitHub URL instead of the relative link, and drop the "if you have access to this repo" conditional , see line comment), otherwise this reintroduces the exact portability problem the second commit set out to fix. Plus three small wording nits inline. Request changes and thanks again ! Happy to approve right after.
… dropped criteria - Relative link broke for standalone copies, same problem the previous commit tried to fix. Use an absolute GitHub URL instead. - Restore 'no circular dependencies' (Architecture) and 'no known vulnerabilities' (Security) that got dropped when compressing. - Match 'dimensions' wording used by this file's own frontmatter and by SKILL.md, instead of 'axes'.
Fixes #172
agents/code-reviewer.mdinlined the full five-axis review frameworkinstead of referencing
skills/code-review-and-quality/SKILL.md, whichalready documents the same framework in more detail. This duplicated
content that would drift out of sync as the skill evolves — something
CONTRIBUTING.md explicitly warns against.
The persona now loads the skill for the review framework and keeps
only what's specific to the persona: role, output format, and
composition rules.
No eval changes needed — this is a persona edit, not a new/modified skill.