Skip to content

feat: Migrate github-pr-review skill from kagenti/kagenti#28

Open
rubambiza wants to merge 3 commits into
rossoctl:mainfrom
rubambiza:feat/migrate-github-pr-review
Open

feat: Migrate github-pr-review skill from kagenti/kagenti#28
rubambiza wants to merge 3 commits into
rossoctl:mainfrom
rubambiza:feat/migrate-github-pr-review

Conversation

@rubambiza

Copy link
Copy Markdown
Contributor

Summary

Migrates the github:pr-review skill from kagenti/kagenti/.claude/skills/github:pr-review/ into this repo as a self-contained, spec-compliant skill importable via /plugin. First unit of the migration epic rossoctl/rossoctl#2149.

Renamed github:pr-reviewgithub-pr-review: the colon form is a Claude Code slash-command convention, not part of the agent skill spec (name allows only a-z0-9-). The flat hyphen keeps the github family prefix and sets the github:*github-* precedent for future migrations.

Zero behavior drift

The review-workflow body is copied verbatim from kagenti/kagenti main. The only differences from source are: frontmatter (name, spec-style description, license), the skill's own /github-pr-review invocation line, and one non-behavioral "companion skills" note.

Why the referenced skills are not bundled

The skill references ci:status, test:review, repo:pr, git:commit, github:prs, rca:ci. Their transitive closure is ~50 kagenti/kagenti skills, 5 levels deep, reaching external superpowers:* — not a portable unit. A fidelity check on 10 substantive human-reviewed PRs found those behaviors appear ~73% of the time but are always performed inline from the skill body, never resolved as dependencies (the spec has no dependency mechanism). So a verbatim port preserves observed behavior; the references are advisory. Full analysis: rossoctl/rossoctl#2149 (comment).

Also

  • Registers the github-pr-review plugin in .claude-plugin/marketplace.json.
  • Adds a README Skills-table row.

Orchestration scripts stay canonical in kagenti/automation (companion issue rossoctl/automation#26); this skill is the sole source of truth for the SKILL.md.

Fixes #27

Assisted-By: Claude Code

Port the github:pr-review skill into agent-skills as a self-contained,
spec-compliant skill importable via /plugin. Renamed github:pr-review ->
github-pr-review (agent-skills flat naming; the colon form is a Claude
Code slash-command convention, not part of the agent skill spec).

The review workflow body is copied verbatim from kagenti/kagenti main
(zero behavior drift); only the frontmatter (name, spec-style
description, license), the skill's own invocation line, and one
non-behavioral 'companion skills' provenance note differ. Referenced
skills (ci:status, test:review, etc.) are kept as advisory pointers;
they are not dependencies and are not bundled.

Register the github-pr-review plugin in marketplace.json and add a
README row.

Part of rossoctl/rossoctl#2149.

Assisted-By: Claude Code (Anthropic AI) <noreply@anthropic.com>

Signed-off-by: Gloire Rubambiza <gloire@ibm.com>
Replace lingering kagenti references in the migrated github-pr-review
skill with their rossoctl equivalents:

- kagenti/kagenti and kagenti-extensions -> rossoctl/rossoctl and cortex
- kagenti/.github verifier reference -> rossoctl/.github (workflow and
  its allowed title prefixes verified unchanged)
- Restate the nonexistent kagenti.io/* label namespace as applying
  appropriate repo labels
- Org-neutral log dir and prose wording

Part of rossoctl/automation#32.

Assisted-By: Claude Code (Anthropic AI) <noreply@anthropic.com>

Signed-off-by: Gloire Rubambiza <gloire@ibm.com>
@rubambiza

Copy link
Copy Markdown
Contributor Author

Pushed ee5ee6a scrubbing the remaining kagenti references from the skill after the org rename:

  • kagenti/kagenti / kagenti-extensions -> rossoctl/rossoctl / cortex
  • Verifier reference kagenti/.github -> rossoctl/.github (confirmed the workflow and its allowed title-prefix list are unchanged under the new org)
  • The kagenti.io/* label check pointed at a namespace that does not exist on rossoctl repos (labels are plain); restated as "applies appropriate repo labels"
  • Org-neutral log dir + prose wording

Part of rossoctl/automation#32.

@clawgenti clawgenti left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migrates the github-pr-review skill into agent-skills as a self-contained, spec-compliant unit. The port is clean — zero behavior drift from source, frontmatter is correct, marketplace registration is consistent with existing entries, and both commits are signed off.

  • must-fix: Troubleshooting §5 contains a factual error about the line API parameter that contradicts Phase 5's own instructions — see inline comment.
  • nit: Mermaid flowchart has no automated/bot path to Submit.

Reviewed by clawgenti using github:pr-review

You flag it as wrong. The PR author says it's correct.

**Cause**: Your local `main` is behind `upstream/main`. The PR was based on the
latest upstream, which has newer dependency versions.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[must-fix] This note contradicts Phase 5 and the GitHub API docs.

Current text says:

The line parameter in the review API refers to the line number in the diff hunk, not the file.

This is incorrect. The line parameter (used in Phase 5) is the file line number on the HEAD side of the diff. The legacy position parameter is what counts lines from the @@ hunk header — but that's a separate, older field not used in Phase 5's payload.

Suggested fix:

The `line` parameter refers to the **file line number on the HEAD side** of the diff.
This differs from the legacy `position` parameter, which counts lines down from the
first `@@` hunk header. Use `line` (as shown in §5.1) — not `position`.

As written, anyone reading this section while debugging failed inline comments will try using diff-hunk offsets instead of file line numbers and break their submissions.

GATHER --> ANALYZE["Phase 2: Analyze"]:::github
ANALYZE --> REVIEW["Phase 3: Review"]:::github
REVIEW --> DRAFT["Phase 4: Draft"]:::github
DRAFT -->|User approves| SUBMIT["Phase 5: Submit"]:::github

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] The flowchart only shows |User approves| as the path from Draft → Submit, implying the approval gate is always mandatory. Bots/automated callers using this skill have no graphical path forward. Consider adding a |Automated / skip §4.4| edge alongside the user-approves edge, or a note that §4.4 is skippable in automated contexts.

- Fix incorrect Troubleshooting note about the review API line param.
  It said line refers to the diff-hunk number 'not the file', which
  contradicts Phase 5. Corrected: line is the file line number on the
  HEAD side; the legacy position param is the hunk-relative one, and
  Phase 5 uses line, not position.
- Add an 'Automated / skip 4.4' edge to the workflow flowchart so the
  bot/automated path to Submit is represented (4.4 approval gate is
  skippable in automated contexts).

Addresses clawgenti review on PR rossoctl#28.

Assisted-By: Claude Code (Anthropic AI) <noreply@anthropic.com>

Signed-off-by: Gloire Rubambiza <gloire@ibm.com>
@rubambiza

Copy link
Copy Markdown
Contributor Author

Addressed the review feedback in 2fbbc6f:

  • must-fix (line param): Corrected the Troubleshooting note. It now states line is the file line number on the HEAD side of the diff, distinguishes it from the legacy position param (hunk-relative), and points to §5.1 — no longer contradicts Phase 5.
  • nit (flowchart): Added a DRAFT -->|Automated / skip §4.4| SUBMIT edge so the automated/bot path to Submit is represented.

Ready for another look.

@clawgenti clawgenti left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both issues from the prior review are addressed: the Troubleshooting line-vs-position correction is accurate, and the flowchart now includes the automated/skip-§4.4 path to Submit.

All checks pass. Ready for human review.


Reviewed by clawgenti using github:pr-review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-ai-review Request automated AI code review from clawgenti

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate github-pr-review skill into agent-skills (spec-compliant)

2 participants