Add automated first-pass issue triage skill and daemon - #4680
Merged
Conversation
Adds a Claude Code skill that investigates a new GitHub issue against current main (reading source, checking git history, running a single targeted test when it clearly maps), classifies it, assigns labels and priority, and posts one triage comment. tools/triage_daemon.py polls for new issues and runs the skill against a dedicated local clone, kept separate from any working copy so the automated git sync never touches in-progress work. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The daemon currently can silently mark issues as processed even when triage fails and has tool-allowlist/state-file reliability gaps that can cause missed or broken triage runs.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds an automated, first-pass GitHub issue triage workflow for Predbat, consisting of a Claude Code skill definition plus a polling daemon that runs the skill in a dedicated origin/main clone.
Changes:
- Introduces an
issue-triageClaude Code skill that guides consistent investigation, labeling, prioritization, and posting a single automated triage comment. - Adds a
tools/triage_daemon.pyscript that polls for new issues, hard-resets a dedicated clone toorigin/main, and invokesclaude -p /issue-triage <n>with tool allow/deny lists and budget/turn caps.
File summaries
| File | Description |
|---|---|
tools/triage_daemon.py |
New polling daemon to sync a dedicated clone and run the triage skill for newly opened issues. |
.claude/skills/issue-triage/SKILL.md |
New Claude Code skill definition describing the triage procedure, guardrails, labeling, and priority rules. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 6
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Updated allowed-tools description and clarified investigation instructions.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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
.claude/skills/issue-triage/SKILL.md: a Claude Code skill that investigates a newly opened issue against currentmain(reads the relevant source, checksgit log/git blamefor recent related changes, fetches any attached log file /predbat_debug.yaml, and runs a single targeted test via./run_all --test <name>when the issue clearly maps to one), then classifies it, applies labels, sets priority (priority_low/priority_medium/priority_high— the latter two are new labels added in this PR), and posts one triage comment disclosed as automated.tools/triage_daemon.py: pollsgh issue listevery 5 minutes, and for each new issue syncs a dedicated local clone toorigin/mainand runs the skill via a headlessclaude -pinvocation, scoped with--allowedTools/--disallowedToolsto git/gh/tests/file-edits-within-that-clone only, no MCP tools,--max-turns/--max-budget-usdcaps.git reset --hard origin/mainbefore each run never touches in-progress work.Guardrails baked into the skill: analysis only (no commits/pushes/PRs from the bot itself), never removes a human-applied label, never closes an issue except a confident duplicate, never runs the full test suite.
Test plan
/issue-triage <number>manually against a real issue in an interactive session to sanity-check the output before relying on the daemontools/triage_daemon.pyon a always-on machine (not a laptop that sleeps), seedstate.jsonwith the current max issue number first so it doesn't process the existing backlogpriority_high/priority_mediumlabels render as expected alongside existingpriority_low🤖 Generated with Claude Code