chore: add reusable triage-discussions workflow for GitHub Discussions review - #3256
Conversation
Permanent named workflow at .claude/workflows/triage-discussions.js,
invokable via Workflow({name:"triage-discussions"}) and visible in
/workflows. It fetches recent GitHub Discussions, drops Announcements
and bot reports, triages each thread, then adversarially verifies
whether each proposed action is genuinely needed against current code
and open issues. Read-only — produces a verified findings report and
posts nothing.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Peter Amiri <petera@pai.com>
There was a problem hiding this comment.
Wheels Bot — Reviewer
TL;DR — This PR adds a single read-only Claude Code Workflow orchestration script (.claude/workflows/triage-discussions.js, +179) that sweeps recent GitHub Discussions, triages each thread, and adversarially verifies proposed actions before reporting. It is maintainer tooling, explicitly outside the framework build/CI, and touches no CFML — so the cross-engine invariants and ORM anti-patterns do not apply here. The script conforms to the documented Workflow-engine contract and the commit is well-formed. Verdict: approve.
Correctness
The script adheres to the Workflow engine semantics on every point I checked:
- The exported
metaobject is a pure literal (no variables, calls, or spreads), with the required name/description and a phases array whose titles (Fetch / Triage / Verify) match thephase()calls. - No use of
Date.now(),Math.random(), or arglessnew Date()— the globals that throw inside workflow scripts. - The
pipeline()second stage uses the documented(prevResult, originalItem, index)signature (here(t, c)) and correctly referencesc.number/c.titlefrom the original item rather than threading them through stage 1. agent()null returns are handled both at the fetch boundary ((fetched && fetched.candidates) || []) and inside the pipeline (theif (!t)guard returning an early result).- Agents inside the pipeline pass explicit per-call
phaseopts of Triage and Verify — the documented way to avoid racing the globalphase()state across concurrent pipeline stages. - The skip-path verdict object adds a non-schema
skippedVerifyfield, but it is constructed manually (not validated against VERDICT_SCHEMA) and downstream only readsverdict.verdict, so this is harmless.
Two trivial, non-blocking observations (no change required):
const MAX = opts.max || 40coerces an explicit max of 0 to 40. Edge case only.reviewed: candidates.lengthreports candidate count rather than surviving findings count; if any triage agent returns null those diverge. Cosmetic.
Commits
chore: add reusable triage-discussions workflow — valid conventional-commit type, header well under 100 chars, not ALL-CAPS, and carries a Signed-off-by: trailer matching the author. The body explains the why (periodic actionable sweep without filing duplicates). Conforms to commitlint.config.js.
Docs
No changelog fragment, .ai/wheels/, or CLAUDE.md update is warranted: this is chore tooling, not a user-facing fix/feat, and it changes no model/controller/view/migration conventions. The PR body documents the args contract and provenance well.
Nice, well-structured use of the verify-after-triage pattern with a skeptical default. LGTM.
Adds a permanent, reusable Claude Code workflow at
.claude/workflows/triage-discussions.js— maintainer tooling for periodically sweeping community GitHub Discussions to surface genuinely actionable items.What it does
Three-phase pipeline, run with
Workflow({name:"triage-discussions"})(also appears in/workflows):Announcements(maintainer marketing/release posts) andgithub-actions(monthly metrics bot), keeps everything updated since a cutoff, returns a structured candidate list.Read-only — it produces a verified findings report and posts nothing to GitHub.
Configurable via
args(all optional){repo:"owner/name", since:"YYYY-MM-DD", max:40}, a JSON string, or a bare date string (treated assince). Defaults:wheels-dev/wheels,2025-01-01,40.Provenance
The first run of this workflow (26 discussions) produced doc PR #3250 and issues #3251 / #3252, and its verify stage overturned 5 stale triage proposals (e.g. a "file an issue" for something already fixed with a regression test). Sibling maintainer workflow
triage-and-fix-open-issues.jsis intentionally not included here.Tooling only — not part of the framework build or CI.
🤖 Generated with Claude Code