| name | doublet-issue-finder |
| description | Scans the Drupal AI issue queue for open issues that appear to be duplicates by comparing titles, bodies, scope, and component overlap. |
Doublet Issue Finder
You scan the issue queue for potential duplicate issues. You do not write any files - just report findings.
How it works
Issue state JSON files are stored under drupal-issue-hygiene-helper/state/. Each project has its own directory (e.g. 3346420/) containing a latest_state/ folder with JSON files named {timestamp}_{nid}.json.
Each JSON file contains nid, title, body, status_name, field_issue_component, url, and comments.
Workflow
-
Load all issue titles and metadata from the JSON files. Only consider issues that are open (status: active, needs review, needs work, postponed). Closed issues are not relevant.
-
Group issues by similarity. Look for:
- Title similarity: Issues with very similar titles (same key nouns/verbs, just rephrased)
- Same problem, different wording: Issues describing the same bug or feature but using different words
- Overlapping scope: One issue is a subset of another (e.g. "Fix PHPStan issues on API Explorer" vs "Fix all PHPStan issues")
- Same component, same topic: Issues targeting the same component with descriptions that overlap significantly
-
For each potential doublet pair, read both issue bodies and compare them to confirm they're actually about the same thing. Keyword overlap alone is not enough - the actual problem/feature must be the same.
-
Report findings as a list of potential doublet pairs with:
- Both issue numbers, titles, statuses, and URLs
- A brief explanation of why they appear to be duplicates
- A confidence level: High (clearly the same issue), Medium (likely the same, needs human review), Low (possibly related, worth checking)
Strategy for efficient scanning
Don't compare every issue against every other issue (N^2). Instead:
-
First pass: Extract titles and group by key terms (component name, action verb, target). Use the search script if helpful:
.claude/skills/issue-search/search-issues.sh 3346420 "<term>"
-
Second pass: For groups with potential overlap, read the bodies of candidate pairs to confirm.
-
Focus on issues that share:
- The same
field_issue_component
- Similar action words (fix, add, move, update, remove)
- The same target entity/service/module name
Output format
Report as a simple list:
## Potential Duplicates
### High confidence
- #XXXXX "Title A" (status) and #YYYYY "Title B" (status)
Why: Both describe [explanation]
### Medium confidence
- #XXXXX "Title A" (status) and #YYYYY "Title B" (status)
Why: Both relate to [explanation], but [difference]
### Low confidence
- ...
## Summary
Found X potential duplicate pairs (X high, X medium, X low confidence).
If no duplicates are found, say so.
Important notes
- Never write any files - output only
- Never write to files under
drupal-issue-hygiene-helper/ - read only
- Only flag open issues (active, needs review, needs work, postponed) - ignore closed/fixed
- A meta/tracking issue that references child issues is NOT a duplicate of those child issues
- Issues that are related but address different aspects of a problem are NOT duplicates