Skip to content

feat: add PR triage dashboard skill - #196

Merged
ilblackdragon merged 4 commits into
mainfrom
feat/triage-prs-skill
Feb 18, 2026
Merged

ilblackdragon merged 4 commits into
mainfrom
feat/triage-prs-skill

Conversation

@ilblackdragon

Copy link
Copy Markdown
Member

Summary

  • Adds /triage-prs slash command for Claude Code that produces a prioritized, module-grouped PR triage dashboard
  • Classifies open PRs by module, review state, scope (Tiny→XL), and nature (fix vs feature vs architectural)
  • Detects conflicts, superseded PRs, and dependency chains against recently merged work

Test plan

  • Run /triage-prs in Claude Code and verify dashboard output
  • Verify --label and --author argument filtering works

🤖 Generated with Claude Code

Adds /triage-prs slash command that classifies all open PRs by module,
review state, scope, and architectural impact to produce a prioritized
triage dashboard for maintainers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 18, 2026 20:29
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @ilblackdragon, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a significant enhancement to the PR management workflow by adding a new Claude Code command. This command automates the process of generating a comprehensive and prioritized dashboard for open pull requests, helping maintainers efficiently identify and address PRs that require immediate attention. The new tool aims to streamline review processes and improve overall repository health by providing clear insights into PR status, scope, and potential conflicts.

Highlights

  • New Command: Introduced the /triage-prs slash command for Claude Code, designed to generate a prioritized PR triage dashboard.
  • PR Classification: Implemented classification of open PRs based on module, review status, scope (Tiny to XL), and nature (fix, feature, architectural).
  • Conflict Detection: Added functionality to detect conflicting, superseded, or dependent PRs against recently merged work.
Changelog
  • .claude/commands/triage-prs.md
    • Added a new command definition file for the PR triage dashboard skill.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new /triage-prs skill, which is a great addition for managing pull requests. The implementation is well-structured as a detailed prompt for the AI. I've provided a couple of suggestions to make the GitHub API calls more robust and efficient by using specific flags for filtering, which should improve the reliability and performance of the skill.

Comment thread .claude/commands/triage-prs.md Outdated
Comment thread .claude/commands/triage-prs.md
ilblackdragon and others added 2 commits February 18, 2026 20:32
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new /triage-prs Claude command that creates a comprehensive dashboard for triaging open pull requests in the repository. The command fetches PR metadata, classifies PRs by module/scope/nature, assesses review state and CI status, and produces a prioritized dashboard showing which PRs need attention.

Changes:

  • Adds .claude/commands/triage-prs.md with a 7-step workflow for PR analysis and dashboard generation
  • Implements module-based classification covering LLM, Agent Core, Tools, Channels, Storage, Security, Sandbox, and other areas
  • Includes filtering by label and author, staleness detection, and conflict identification

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .claude/commands/triage-prs.md Outdated
gh pr list --state open --limit 100 --json number,title,author,labels,additions,deletions,headRefName,createdAt,isDraft,reviewRequests,reviews,files
```

If `$ARGUMENTS` contains `--label=<X>` or `--author=<X>`, add the corresponding flags to the `gh pr list` command.

Copilot AI Feb 18, 2026

Copy link

Choose a reason for hiding this comment

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

The instruction says "filter the results accordingly" but doesn't specify how to implement the filtering for --label and --author arguments. The gh pr list command supports native --label and --author flags that should be used. Consider adding explicit instructions like:

"If $ARGUMENTS contains --label=, add --label '' to the gh pr list command. If it contains --author=, add --author '' to the gh pr list command."

This ensures consistent implementation and leverages GitHub CLI's built-in filtering.

Suggested change
If `$ARGUMENTS` contains `--label=<X>` or `--author=<X>`, add the corresponding flags to the `gh pr list` command.
If `$ARGUMENTS` contains `--label=<X>`, append `--label '<X>'` to the `gh pr list` command. If `$ARGUMENTS` contains `--author=<X>`, append `--author '<X>'` to the `gh pr list` command.

Copilot uses AI. Check for mistakes.
Comment thread .claude/commands/triage-prs.md Outdated

| Category | Directories |
|----------|------------|
| **LLM & Inference** | `src/llm/`, `src/llm/provider.rs`, `src/llm/nearai.rs`, etc. |

Copilot AI Feb 18, 2026

Copy link

Choose a reason for hiding this comment

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

The module classification table lists "src/llm/provider.rs, src/llm/nearai.rs, etc." as examples under LLM & Inference. However, this creates ambiguity since it mixes directory paths (src/llm/) with specific file paths. Since these are files within src/llm/, they're already covered by the directory pattern "src/llm/".

Consider simplifying to just "src/llm/" to avoid confusion, or clarify that the specific file mentions are just illustrative examples of what's in that directory.

Suggested change
| **LLM & Inference** | `src/llm/`, `src/llm/provider.rs`, `src/llm/nearai.rs`, etc. |
| **LLM & Inference** | `src/llm/` |

Copilot uses AI. Check for mistakes.
- Key risk areas to focus review on

### Changes Requested (Waiting on Author)
PRs where a reviewer asked for changes. Include who requested and a 1-line summary of what's needed.

Copilot AI Feb 18, 2026

Copy link

Choose a reason for hiding this comment

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

The dashboard section "Changes Requested (Waiting on Author)" says to "Include who requested" the changes, but the data fetched in Step 1 only includes the reviews array. To identify WHO requested changes, you'd need to parse the reviews data to find review authors where state == "CHANGES_REQUESTED".

Consider adding explicit instructions in Step 3 to extract reviewer information from the reviews data, or clarify in Step 7 that "who requested" refers to data available in the reviews array from Step 1.

Suggested change
PRs where a reviewer asked for changes. Include who requested and a 1-line summary of what's needed.
PRs where a reviewer asked for changes (based on reviews where `state == "CHANGES_REQUESTED"`). For each PR, use the `reviews` array from Step 1 to extract the reviewer(s) who requested changes, and include their names plus a 1-line summary of what's needed.

Copilot uses AI. Check for mistakes.
- Staleness: how many days since last push/comment?

## Step 4: Determine scope and risk

Copilot AI Feb 18, 2026

Copy link

Choose a reason for hiding this comment

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

Step 3 mentions checking "how many days since last push/comment" for staleness, but Step 1 only fetches createdAt. To properly calculate staleness based on last activity:

  1. The gh pr list command should include "updatedAt" in the --json fields, or
  2. Additional API calls are needed to determine last push/comment time

Without this data, staleness can only be calculated from creation date, which won't identify PRs that were active initially but have since gone stale. Consider adding "updatedAt" to the Step 1 query.

Copilot uses AI. Check for mistakes.
- New provider abstractions
- Changes touching 5+ modules
- Anything modifying the agent loop, session model, or security layer
- New dependencies (check Cargo.toml changes)

Copilot AI Feb 18, 2026

Copy link

Choose a reason for hiding this comment

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

Line 99 says to check "New dependencies (check Cargo.toml changes)" as part of architectural classification. However, the files field from Step 1 only lists filenames, not the actual diff content. To detect new dependencies:

  1. Check if "Cargo.toml" appears in the files list (indicates potential dependency changes), or
  2. Use gh pr diff to examine the actual changes (which would require fetching diffs for each PR)

Consider clarifying that this check should look for Cargo.toml in the changed files list, or note that the Task tool should be used to fetch diffs when needed for detailed classification.

Suggested change
- New dependencies (check Cargo.toml changes)
- New dependencies (if `Cargo.toml` appears in the changed files list, or identified via `gh pr diff` when you fetch diffs with the Task tool)

Copilot uses AI. Check for mistakes.
- **Reviewed (comments only)** — Human comments but no formal approve/reject
- **Automated only** — Only bot reviews (gemini-code-assist, copilot, etc.)
- **No review** — No reviews at all

Copilot AI Feb 18, 2026

Copy link

Choose a reason for hiding this comment

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

The review state assessment mentions distinguishing between "human" and "bot" reviews (line 55: "gemini-code-assist, copilot, etc."), but doesn't provide guidance on how to identify bot reviewers.

The command should clarify how to detect bot reviews. Common approaches include:

  1. Checking if the reviewer's login contains "bot" or ends with "[bot]"
  2. Checking the reviewer's type field in the GitHub API response
  3. Maintaining a known list of bot reviewer names

Without clear criteria, different executions might classify the same reviews inconsistently.

Suggested change
When classifying reviews as human vs bot:
- Treat a review as a **bot** review if the reviewer’s `type` field in the GitHub API/`gh` JSON is `Bot` (or equivalent).
- Also treat a review as a **bot** review if the reviewer login:
- ends with `[bot]`, or
- clearly indicates a bot account (e.g., contains `-bot` or is in a maintained allowlist of known bot reviewers such as `gemini-code-assist`, `github-actions[bot]`, `copilot`, etc.).
- All other reviewers should be treated as **human** for the purposes of the review state categories above.

Copilot uses AI. Check for mistakes.
Comment on lines +67 to +73
| **Small** | 50-200 lines, 1-5 files |
| **Medium** | 200-500 lines, 3-10 files |
| **Large** | 500-2000 lines, 5-20 files |
| **XL** | 2000+ lines or 20+ files |

## Step 5: Classify as fix vs. architectural

Copilot AI Feb 18, 2026

Copy link

Choose a reason for hiding this comment

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

The scope classification uses "lines changed" as a criterion, but doesn't specify whether this means total lines (additions + deletions), net lines (additions - deletions), or just additions.

Since Step 1 fetches both "additions" and "deletions" fields separately, the command should clarify which metric to use. Most PR size classifications use total changes (additions + deletions) to reflect the review burden. Consider adding: "lines changed = additions + deletions".

Copilot uses AI. Check for mistakes.
Comment thread .claude/commands/triage-prs.md Outdated
Fetch every open PR with metadata:

```
gh pr list --state open --limit 100 --json number,title,author,labels,additions,deletions,headRefName,createdAt,isDraft,reviewRequests,reviews,files

Copilot AI Feb 18, 2026

Copy link

Choose a reason for hiding this comment

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

Step 6 instructs to "look at 'Closes #N' / 'Fixes #N' in PR bodies" but Step 1 doesn't fetch the PR body field. The gh pr list command in Step 1 only fetches: number, title, author, labels, additions, deletions, headRefName, createdAt, isDraft, reviewRequests, reviews, files.

To detect superseded PRs and dependency chains as described, either:

  1. Add "body" to the --json fields in Step 1, or
  2. Use gh pr view for each PR to fetch bodies (which would be expensive for many PRs)

Without the body field, this analysis cannot be completed as specified.

Suggested change
gh pr list --state open --limit 100 --json number,title,author,labels,additions,deletions,headRefName,createdAt,isDraft,reviewRequests,reviews,files
gh pr list --state open --limit 100 --json number,title,author,labels,additions,deletions,headRefName,createdAt,isDraft,reviewRequests,reviews,files,body

Copilot uses AI. Check for mistakes.
Comment on lines +75 to +99

### Fixes (merge fast)
- Bug fixes with clear root cause
- Security patches
- Crash/panic prevention
- Typo/doc corrections
- Code quality (removing .unwrap(), etc.)

### Features (standard review)
- New functionality within existing patterns
- New tool implementations
- Configuration additions
- Test additions

### Architectural (deep review needed)
- New modules or subsystems
- Changes to core traits or interfaces
- New database backends or storage engines
- New provider abstractions
- Changes touching 5+ modules
- Anything modifying the agent loop, session model, or security layer
- New dependencies (check Cargo.toml changes)

## Step 6: Detect conflicts and superseded PRs

Copilot AI Feb 18, 2026

Copy link

Choose a reason for hiding this comment

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

Step 5 requires classifying PRs by their nature (fixes, features, architectural) based on criteria like "Bug fixes with clear root cause", "Security patches", "New modules or subsystems", etc. However, this classification requires understanding the PR's semantic content and intent, which cannot be reliably determined from just the metadata fetched in Step 1 (title, labels, files, etc.).

To make this classification feasible, consider:

  1. Relying primarily on PR labels (bug, enhancement, breaking-change, etc.) if the repository uses them
  2. Using title patterns (e.g., "fix:", "feat:", "refactor:" conventional commit prefixes)
  3. Adding instructions to fetch PR bodies (as noted in comment Codex/feature parity pr hook #6) for more context
  4. Making it clear this is a best-effort heuristic classification that may need human judgment

Without additional guidance, this step may be too subjective and inconsistent across executions.

Copilot uses AI. Check for mistakes.
Comment on lines +113 to +115
```

### Ready to Merge

Copilot AI Feb 18, 2026

Copy link

Choose a reason for hiding this comment

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

The "Quick Stats" section shows counts for various states: "Open: N | Draft: N | Needs review: N | Changes requested: N | Ready to merge: N". However, these categories have overlaps:

  • "Draft" PRs are also "Open"
  • "Changes requested" PRs might also "Need review" after changes are made
  • "Ready to merge" PRs are also "Open"

Consider clarifying the counting logic, such as:

  • Open (total) | Draft | Ready to merge | Needs review | Changes requested | Stale
    Or use mutually exclusive categories that sum to the total Open count.

Copilot uses AI. Check for mistakes.
- Add body and updatedAt to PR query fields for superseded detection
- Use --label/--author flags directly instead of post-filtering
- Use date-based --search for merged PRs instead of --limit 20
- Simplify LLM module listing, add missing module categories
- Use updatedAt for staleness, clarify lines changed metric

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ilblackdragon

Copy link
Copy Markdown
Member Author

Addressed review feedback in 4e3c4b2:

Fixed (7 items):

  • Added body and updatedAt to open PR query fields
  • Added body to merged PR query fields
  • Use --label/--author flags directly instead of post-filtering
  • Use date-based --search for merged PRs instead of --limit 20
  • Simplified LLM module listing to just src/llm/
  • Added missing module categories: Hooks & Extensions, Context & History, CLI
  • Clarified lines changed = additions + deletions

Not changed (5 items — false positives for an LLM prompt):

  • Bot detection guidance: The LLM can distinguish bots from the type field in review JSON without explicit instructions
  • Cargo.toml dep check: The file list already contains filenames — the LLM checks presence naturally
  • Quick Stats overlap: Non-exclusive summary counts are standard dashboard format
  • Reviewer extraction: The reviews array already contains author info
  • Classification subjectivity: Heuristic classification from title/files/body is what LLMs do well; rigid rules would be worse

@ilblackdragon
ilblackdragon merged commit 6330f1b into main Feb 18, 2026
2 checks passed
@ilblackdragon
ilblackdragon deleted the feat/triage-prs-skill branch February 18, 2026 22:38
@github-actions github-actions Bot mentioned this pull request Feb 18, 2026
jaswinder6991 pushed a commit to jaswinder6991/ironclaw that referenced this pull request Feb 26, 2026
* feat: add PR triage dashboard skill

Adds /triage-prs slash command that classifies all open PRs by module,
review state, scope, and architectural impact to produce a prioritized
triage dashboard for maintainers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Apply suggestions from code review

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* fix: address review feedback on triage-prs skill

- Add body and updatedAt to PR query fields for superseded detection
- Use --label/--author flags directly instead of post-filtering
- Use date-based --search for merged PRs instead of --limit 20
- Simplify LLM module listing, add missing module categories
- Use updatedAt for staleness, clarify lines changed metric

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Illia Polosukhin <ilblacdragon@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
bkutasi pushed a commit to bkutasi/ironclaw that referenced this pull request Mar 28, 2026
* feat: add PR triage dashboard skill

Adds /triage-prs slash command that classifies all open PRs by module,
review state, scope, and architectural impact to produce a prioritized
triage dashboard for maintainers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Apply suggestions from code review

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* fix: address review feedback on triage-prs skill

- Add body and updatedAt to PR query fields for superseded detection
- Use --label/--author flags directly instead of post-filtering
- Use date-based --search for merged PRs instead of --limit 20
- Simplify LLM module listing, add missing module categories
- Use updatedAt for staleness, clarify lines changed metric

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Illia Polosukhin <ilblacdragon@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants