From 954f1db7eb04a6139501a5bed892404d3da2b495 Mon Sep 17 00:00:00 2001 From: alexbelgium Date: Thu, 23 Jul 2026 09:59:54 +0200 Subject: [PATCH 1/4] chore: add two-tier AI issue triage (workflows, script, prompts) Install tier-1 classifier (on_issues_ai_triage.yaml) and tier-2 fix sweep (weekly_ai_fix.yaml) plus their helper script and prompts. Pre-merge fixes from verification: - Wait-for-ping sleep 150s -> 60s. on_issues_ping_submitter completes in 6-11s of job time across the last 10 runs; 60s covers runner-queue skew with margin. - Rule 0 rewritten to match the real ownership signal: ping_submitter posts a github-actions[bot] comment with a stable marker ``. Rule 0 now keys off that literal marker instead of fuzzy prose, and guards against @ == alexbelgium. - Silence one intentional shellcheck SC2016 (literal Markdown backticks) so actionlint runs clean. Co-Authored-By: Claude Opus 4.8 --- .github/prompts/issue-classify.md | 99 +++++++++++++++ .github/prompts/issue-fix.md | 74 +++++++++++ .github/scripts/ai_triage_context.sh | 99 +++++++++++++++ .github/workflows/on_issues_ai_triage.yaml | 136 +++++++++++++++++++++ .github/workflows/weekly_ai_fix.yaml | 114 +++++++++++++++++ 5 files changed, 522 insertions(+) create mode 100644 .github/prompts/issue-classify.md create mode 100644 .github/prompts/issue-fix.md create mode 100755 .github/scripts/ai_triage_context.sh create mode 100644 .github/workflows/on_issues_ai_triage.yaml create mode 100644 .github/workflows/weekly_ai_fix.yaml diff --git a/.github/prompts/issue-classify.md b/.github/prompts/issue-classify.md new file mode 100644 index 0000000000..bee0c821ae --- /dev/null +++ b/.github/prompts/issue-classify.md @@ -0,0 +1,99 @@ +# Issue classifier — tier 1 + +You are triaging a new issue on `alexbelgium/hassio-addons`, a monorepo of +100+ Home Assistant add-ons. Each add-on is a thin wrapper (Dockerfile, +`run.sh`, s6 services, nginx config, `config.yaml`) around an upstream +application that Alex does not maintain. + +Your entire output is one JSON object written to `/tmp/ai-triage/verdict.json`. +You do not comment, label, or edit anything. + +## Rule 0 — ownership short-circuit + +Read the existing comments in the context bundle first. The +`on_issues_ping_submitter` workflow signals ownership by posting a **comment** +(authored by `github-actions[bot]`) that pings the add-on's original submitter. +Its exact, machine-stable format is: + +``` + +Heads up @: this issue appears to mention ``. +``` + +Match it on the literal marker `