feat(skills): improve triage skills scalability for large repos#1697
Open
FlorianBruniaux wants to merge 1 commit intodevelopfrom
Open
feat(skills): improve triage skills scalability for large repos#1697FlorianBruniaux wants to merge 1 commit intodevelopfrom
FlorianBruniaux wants to merge 1 commit intodevelopfrom
Conversation
- Add --focus modes (recent/critical/stale/all) with auto-activation above 200 items - Switch to two-pass data gathering: metadata first, bodies only for scoped items - Cap parallel agents: 20 for issue-triage, 15 for pr-triage, with batching above limit - Optimize duplicate detection: n-gram pre-filter reduces Jaccard comparisons from ~160K to ~2-5K - Cap overlap detection to targeted sample (updatedAt <30d, additions <1000, not stale draft) - Add pagination support via gh api cursor for repos >400 items - Cap cross-analysis window in rtk-triage to 100 issues x 100 PRs Signed-off-by: Florian BRUNIAUX <florian@bruniaux.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the Claude triage skills to scale better on large repositories by introducing focus-based scoping, reducing expensive data pulls, and adding caps to avoid combinatorial/token explosions during cross-analysis.
Changes:
- Add
--focusfiltering modes (recent/critical/stale/all) with an auto “recent” fallback above 200 items. - Switch triage workflows toward a two-pass gathering strategy (metadata first, bodies/files only for scoped items).
- Add explicit batching limits for parallel deep-analysis agents and cap cross-analysis windows/overlap detection.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| .claude/skills/rtk-triage/SKILL.md | Documents new focus modes, two-pass gathering, overlap/window caps, and pagination guidance for combined triage. |
| .claude/skills/pr-triage/SKILL.md | Adds --focus modes, two-pass fetching, and batching limits for deep PR reviews/overlap detection. |
| .claude/skills/issue-triage/SKILL.md | Adds --focus modes, duplicate-detection scaling notes, two-pass strategy, and batching limits for deep issue analysis. |
Comment on lines
+81
to
+85
| **PRs — Passe 1 (métadonnées)**: | ||
| ```bash | ||
| gh pr list --state open --limit 500 \ | ||
| --json number,title,author,createdAt,updatedAt,additions,deletions,changedFiles,isDraft,mergeable,reviewDecision,statusCheckRollup,body | ||
| ``` |
Comment on lines
+5
to
+6
| Args: "all" to review all, PR numbers to focus (e.g. "42 57"), "en"/"fr" for language, | ||
| "--focus recent" (default, last 60d), "--focus critical" (bugs/security), "--all" (everything). |
Comment on lines
+44
to
+47
| | `--focus recent` | PRs updatedAt < 60j (défaut si >200 PRs) | Triage hebdomadaire normal | | ||
| | `--focus critical` | CI dirty + CONFLICTING + overlaps détectés | Sprint urgent, avant merge | | ||
| | `--focus stale` | Aucune activité >14j | Nettoyage backlog | | ||
| | `--all` | Toutes les PRs ouvertes, paginé | Audit exhaustif mensuel | |
Comment on lines
+5
to
+6
| Args: "all" for deep analysis of all, issue numbers to focus (e.g. "42 57"), "en"/"fr" for language, | ||
| "--focus recent" (default, last 60d), "--focus critical", "--focus stale", "--all" (everything). |
| puis croise les données pour détecter doubles couvertures, trous sécurité, | ||
| P0 sans PR, et conflits internes. Sauvegarde dans claudedocs/RTK-YYYY-MM-DD.md. | ||
| Args: "en"/"fr" pour la langue (défaut: fr), "save" pour forcer la sauvegarde. | ||
| Args: "en"/"fr" pour la langue (défaut: fr), "--focus recent/critical/stale/all", "save" pour forcer la sauvegarde. |
| puis croise les données pour détecter doubles couvertures, trous sécurité, | ||
| P0 sans PR, et conflits internes. Sauvegarde dans claudedocs/RTK-YYYY-MM-DD.md. | ||
| Args: "en"/"fr" pour la langue (défaut: fr), "save" pour forcer la sauvegarde. | ||
| Args: "en"/"fr" pour la langue (défaut: fr), "--focus recent/critical/stale/all", "save" pour forcer la sauvegarde. |
Comment on lines
+75
to
81
| # Issues ouvertes — métadonnées sans body ni comments (léger) | ||
| gh issue list --state open --limit 500 \ | ||
| --json number,title,author,createdAt,updatedAt,labels,assignees | ||
|
|
||
| # PRs ouvertes (pour cross-référence) | ||
| gh pr list --state open --limit 50 --json number,title,body | ||
| # PRs ouvertes pour cross-référence (body nécessaire pour fixes #N) | ||
| gh pr list --state open --limit 500 --json number,title,body | ||
|
|
Comment on lines
+101
to
+106
| gh issue view {num} --json body,comments \ | ||
| --jq '{body: .body, comments: (.comments[-5:] | map(.body))}' | ||
| ``` | ||
|
|
||
| Si issue a >50 commentaires, fetcher uniquement les 5 derniers. | ||
|
|
Comment on lines
+100
to
+106
| **Pagination si >400 items** : utiliser `gh api` avec curseur : | ||
| ```bash | ||
| # Issues au-delà de 400 | ||
| gh api "repos/{owner}/{repo}/issues?state=open&per_page=100&page=2" \ | ||
| --jq '[.[] | {number: .number, title: .title, updatedAt: .updated_at}]' | ||
| # Répéter page=3, page=4... jusqu'à réponse vide | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--focusmodes (recent/critical/stale/all) with auto-activation above 200 items — prevents token explosion on large reposgh apicursor for repos beyond 400 itemsTest plan
/issue-triageon a repo with >200 open issues, verify--focus recentactivates automatically/pr-triage --focus criticaland confirm only CI-dirty + CONFLICTING PRs appear/rtk-triage --alland verify pagination kicks in beyond 400 items🤖 Generated with Claude Code