Skip to content

Commit 1a2819e

Browse files
authored
Merge pull request #827 from brunoborges/aw/relevance-check
Aw/relevance check
2 parents 3f90604 + 18f542e commit 1a2819e

3 files changed

Lines changed: 139 additions & 0 deletions

File tree

docs/README.workflows.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,5 @@ See [CONTRIBUTING.md](../CONTRIBUTING.md#adding-agentic-workflows) for guideline
3838
| [OSPO Organization Health Report](../workflows/ospo-org-health.md) | Comprehensive weekly health report for a GitHub organization. Surfaces stale issues/PRs, merge time analysis, contributor leaderboards, and actionable items needing human attention. | schedule, workflow_dispatch |
3939
| [OSPO Stale Repository Report](../workflows/ospo-stale-repos.md) | Identifies inactive repositories in your organization and generates an archival recommendation report. | schedule, workflow_dispatch |
4040
| [OSS Release Compliance Checker](../workflows/ospo-release-compliance-checker.md) | Analyzes a target repository against open source release requirements and posts a detailed compliance report as an issue comment. | issues, workflow_dispatch |
41+
| [Relevance Check](../workflows/relevance-check.md) | Slash command to evaluate whether an issue or pull request is still relevant to the project | slash_command, roles |
42+
| [Relevance Summary](../workflows/relevance-summary.md) | Manually triggered workflow that summarizes all open issues and PRs with a /relevance-check response into a single issue | workflow_dispatch |

workflows/relevance-check.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
name: Relevance Check
3+
description: "Slash command to evaluate whether an issue or pull request is still relevant to the project"
4+
on:
5+
slash_command:
6+
name: relevance-check
7+
roles: [admin, maintainer, write]
8+
engine:
9+
id: copilot
10+
permissions:
11+
contents: read
12+
issues: read
13+
pull-requests: read
14+
tools:
15+
github:
16+
toolsets: [default]
17+
safe-outputs:
18+
add-comment:
19+
max: 1
20+
---
21+
22+
# Relevance Check Agent
23+
24+
You are a relevance evaluator for the **${{ github.repository }}** repository. A maintainer has invoked `/relevance-check` on an issue or pull request and your job is to determine whether it is still relevant, actionable, and worth keeping open.
25+
26+
## Context
27+
28+
The triggering content is:
29+
30+
"${{ steps.sanitized.outputs.text }}"
31+
32+
## Instructions
33+
34+
### 1. Gather Information
35+
36+
- Read the full issue or pull request details, including the title, body, all comments, and any linked items.
37+
- Look at the current state of the codebase — check if the files, classes, or packages mentioned still exist and whether the problem described has already been addressed.
38+
- Review recent commits and pull requests to see if related changes have been merged.
39+
- Check if there are duplicate or related issues that cover the same topic.
40+
41+
### 2. Evaluate Relevance
42+
43+
Consider these factors:
44+
45+
- **Still applicable?** Does the described bug, feature request, or change still apply to the current codebase?
46+
- **Already resolved?** Has the issue been fixed or the feature implemented in a subsequent commit or PR, even if this item was never explicitly closed?
47+
- **Superseded?** Has a newer issue or PR replaced this one?
48+
- **Stale context?** Are the referenced APIs, dependencies, or architectural patterns still in use, or has the project moved on?
49+
- **Actionability?** Is there enough information to act on this item, or is it too vague or outdated to be useful?
50+
51+
### 3. Provide Your Analysis
52+
53+
Post a single comment with your analysis using this structure:
54+
55+
**Relevance Assessment: [Still Relevant | Likely Outdated | Needs Discussion]**
56+
57+
- **Summary**: A 1-2 sentence verdict.
58+
- **Evidence**: Bullet points with concrete findings (e.g., "The class `XYZParser` referenced in the issue was removed in commit abc1234" or "This feature was implemented in PR #42").
59+
- **Recommendation**: One of:
60+
-**Keep open** — the item is still valid and actionable.
61+
- 🗄️ **Consider closing** — the item appears resolved or no longer applicable. Explain why.
62+
- 💬 **Needs maintainer input** — you found mixed signals and a human should decide.
63+
64+
Be concise, factual, and cite specific commits, PRs, files, or code when possible. Do not make changes to the repository — your only action is to comment with your analysis.

workflows/relevance-summary.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
name: Relevance Summary
3+
description: "Manually triggered workflow that summarizes all open issues and PRs with a /relevance-check response into a single issue"
4+
on:
5+
workflow_dispatch:
6+
engine:
7+
id: copilot
8+
permissions:
9+
contents: read
10+
issues: read
11+
pull-requests: read
12+
tools:
13+
github:
14+
toolsets: [default]
15+
safe-outputs:
16+
create-issue:
17+
title-prefix: "[Relevance Summary] "
18+
labels: [report]
19+
close-older-issues: true
20+
---
21+
22+
# Relevance Check Summary Report
23+
24+
You are a report generator for the **${{ github.repository }}** repository.
25+
Your job is to find all open issues and pull requests that have received a `/relevance-check` response, and compile a summary issue.
26+
27+
## Instructions
28+
29+
### 1. Find Relevant Items
30+
31+
Search all **open** issues and pull requests in this repository.
32+
For each one, read its comments and look for a comment that contains a **"Relevance Assessment"** section — this is the output of the `/relevance-check` slash command.
33+
34+
A relevance-check response contains these markers:
35+
- A heading or bold text with **"Relevance Assessment:"** followed by one of: `Still Relevant`, `Likely Outdated`, or `Needs Discussion`
36+
- A **Recommendation** section with one of: ✅ **Keep open**, 🗄️ **Consider closing**, or 💬 **Needs maintainer input**
37+
38+
### 2. Extract Information
39+
40+
For each issue or PR that has a relevance-check response, extract:
41+
- The issue/PR number and title
42+
- Whether it is an issue or a pull request
43+
- The relevance assessment verdict (Still Relevant / Likely Outdated / Needs Discussion)
44+
- The recommended action (Keep open / Consider closing / Needs maintainer input)
45+
46+
### 3. Create the Summary Issue
47+
48+
Create a single issue with a table summarizing all findings. Use this structure:
49+
50+
```
51+
### Relevance Check Summary
52+
53+
Summary of all open issues and pull requests that have been evaluated with `/relevance-check`.
54+
55+
**Generated:** YYYY-MM-DD
56+
57+
| # | Type | Title | Assessment | Recommendation |
58+
|---|------|-------|------------|----------------|
59+
| [#N](link) | Issue/PR | Brief title | Still Relevant / Likely Outdated / Needs Discussion | ✅ Keep open / 🗄️ Consider closing / 💬 Needs maintainer input |
60+
61+
### Statistics
62+
- Total evaluated: N
63+
- Still Relevant: N
64+
- Likely Outdated: N
65+
- Needs Discussion: N
66+
```
67+
68+
### 4. Guidelines
69+
70+
- If no open issues or PRs have a relevance-check response, create the issue stating that no items were found.
71+
- Sort the table by assessment: list "Likely Outdated" items first (most actionable), then "Needs Discussion", then "Still Relevant".
72+
- Keep titles brief in the table — truncate to ~60 characters if needed.
73+
- Always link the issue/PR number to its URL.

0 commit comments

Comments
 (0)