Skip to content

Add automated first-pass issue triage skill and daemon - #4680

Merged
springfall2008 merged 9 commits into
mainfrom
feat/issue-triage-skill
Aug 24, 2026
Merged

Add automated first-pass issue triage skill and daemon#4680
springfall2008 merged 9 commits into
mainfrom
feat/issue-triage-skill

Conversation

@springfall2008

Copy link
Copy Markdown
Owner

Summary

  • Adds .claude/skills/issue-triage/SKILL.md: a Claude Code skill that investigates a newly opened issue against current main (reads the relevant source, checks git log/git blame for 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.
  • Adds tools/triage_daemon.py: polls gh issue list every 5 minutes, and for each new issue syncs a dedicated local clone to origin/main and runs the skill via a headless claude -p invocation, scoped with --allowedTools/--disallowedTools to git/gh/tests/file-edits-within-that-clone only, no MCP tools, --max-turns/--max-budget-usd caps.
  • The daemon intentionally runs against its own dedicated clone (not a contributor's working copy), so the automated git reset --hard origin/main before 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

  • Run /issue-triage <number> manually against a real issue in an interactive session to sanity-check the output before relying on the daemon
  • Deploy tools/triage_daemon.py on a always-on machine (not a laptop that sleeps), seed state.json with the current max issue number first so it doesn't process the existing backlog
  • Confirm priority_high / priority_medium labels render as expected alongside existing priority_low

🤖 Generated with Claude Code

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>
Copilot AI lite review requested due to automatic review settings August 23, 2026 20:40
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.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.

🟡 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-triage Claude Code skill that guides consistent investigation, labeling, prioritization, and posting a single automated triage comment.
  • Adds a tools/triage_daemon.py script that polls for new issues, hard-resets a dedicated clone to origin/main, and invokes claude -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.

Comment thread tools/triage_daemon.py
Comment thread tools/triage_daemon.py
Comment thread tools/triage_daemon.py Outdated
Comment thread tools/triage_daemon.py
Comment thread tools/triage_daemon.py
Comment thread .claude/skills/issue-triage/SKILL.md
springfall2008 and others added 7 commits August 23, 2026 21:43
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>
@springfall2008
springfall2008 merged commit 0ba448c into main Aug 24, 2026
2 checks passed
@springfall2008
springfall2008 deleted the feat/issue-triage-skill branch August 24, 2026 09:07
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