Skip to content

Support input_number.* entities for hardware setpoint writes (not just number.*) #137

Support input_number.* entities for hardware setpoint writes (not just number.*)

Support input_number.* entities for hardware setpoint writes (not just number.*) #137

Workflow file for this run

# Stage 1 — Triage
#
# Runs on every new or edited issue. Cheap classification only — no source
# reading, no fix proposals. Decides whether the issue is ready for deep
# analysis (Stage 2: issue-analyze.yml) or needs more info from the user.
#
# Pipeline:
# 1. issue-triage.yml (auto, this file) — classify, label
# 2. issue-analyze.yml (manual: @claude-bot analyze) — deep root-cause
# 3. issue-fix.yml (manual: @claude-bot fix) — implement, draft PR
# 4. pr-review.yml (manual: @claude-bot) — PR review
name: Issue Triage
on:
issues:
types: [opened, edited, reopened]
workflow_dispatch:
inputs:
issue_number:
description: "Issue number to triage"
required: true
type: number
jobs:
triage:
name: Triage
# Don't re-triage issues that have already been deeply analyzed.
if: |
github.event_name == 'workflow_dispatch' ||
!contains(github.event.issue.labels.*.name, 'analyzed')
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- uses: actions/checkout@v5
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ secrets.CLAUDE_REVIEWER_APP_ID }}
private-key: ${{ secrets.CLAUDE_REVIEWER_PRIVATE_KEY }}
- uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
github_token: ${{ steps.app-token.outputs.token }}
# Anyone can open an issue, so triage must run for non-collaborators
# too — otherwise external bug reports never get asked for a debug
# log. Safe here: Haiku, classify/label/comment only, no code access.
allowed_non_write_users: "*"
# Haiku is plenty for classify+label; saves ~3x vs Sonnet.
claude_args: "--max-turns 12 --permission-mode bypassPermissions --model claude-haiku-4-5"
prompt: |
You are the **Stage 1 Triage** bot for issue #${{ github.event.issue.number || github.event.inputs.issue_number }} in johanzander/bess-manager.
Run first:
gh issue view ${{ github.event.issue.number || github.event.inputs.issue_number }} --json title,body,labels,comments
Classify into one of four buckets and act. Use `gh issue edit <n> --add-label <label>` for labels and `gh issue comment <n> -b "..."` for comments.
──────────────────────────────────────────────────────────────────
(a) BUG WITH DEBUG LOG
──────────────────────────────────────────────────────────────────
A debug log is present if the issue body or a comment contains a
JSON dump that looks like a debug report — e.g. keys like
"BESS Configuration", "Price Settings", "Health Check", or a
structured system-state JSON object.
Action:
- Labels: `bug`, `bot-analyzed`, `ready-for-analysis`
- Comment (concise, one short paragraph max):
• One-line summary of the user's report
• Confirm the debug log was received
• End EXACTLY with: "Reply `@claude-bot analyze` to start deep code-level analysis."
- DO NOT speculate about root cause. DO NOT read source code.
──────────────────────────────────────────────────────────────────
(b) BUG WITHOUT DEBUG LOG
──────────────────────────────────────────────────────────────────
Action:
- Labels: `bug`, `bot-analyzed`, `needs-debug-log`
- Comment: politely ask the user to attach a debug log.
Steps: System Health → Download Debug Report → paste the JSON
in a comment or attach the file.
- Explain: deep analysis can't run without the log because the
code path depends on configuration and sensor state.
──────────────────────────────────────────────────────────────────
(c) QUESTION or FEATURE REQUEST
──────────────────────────────────────────────────────────────────
Action:
- Label: `question` or `enhancement`, plus `bot-analyzed`
- Comment: respond helpfully if the answer is in CLAUDE.md or
the issue is a usage question. Otherwise note it's queued for
human review.
──────────────────────────────────────────────────────────────────
(d) UNCLEAR
──────────────────────────────────────────────────────────────────
Action:
- Label: `bot-analyzed`
- Comment: ask ONE specific clarifying question.
──────────────────────────────────────────────────────────────────
HARD CONSTRAINTS
──────────────────────────────────────────────────────────────────
- DO NOT read source files. DO NOT propose fixes.
- DO NOT claim a bug is confirmed — that's Stage 2's job.
- Use hedged language ("the report suggests…", "this may indicate…").
- Keep your comment under ~150 words. Brevity > thoroughness here.