Repository navigation
Description
Summary
templates/workflows/squad-triage.yml presents keyword-matching output as the Lead agent's analysis. The posted comment is titled:
### ποΈ Squad Triage β {lead.name} ({lead.role})
**Assigned to:** ...
**Reason:** Issue relates to frontend/UI work
No agent runs. Reason: is a hardcoded string selected by issueText.includes(...). A reader reasonably concludes the Lead read the issue and reasoned about it.
This matters beyond cosmetics: it makes a low-accuracy signal look like a high-accuracy one, which is exactly when a human stops double-checking.
Specific defects
-
Unbounded substring matching.
issueText.includes('ci')matches "specific", "decision", "precision".includes('ui')matches "build", "require", "guide".includes('api')matches "rapid". -
Unconditional Lead fallback. When nothing matches, the issue is assigned to the Lead with
Reason: No specific domain match. There is no "unassigned" or "ambiguous" outcome, so the workflow always produces a confident-looking answer. -
routing.mdis read but never used for routing.routingContentis loaded and then unreferenced; routing uses role keywords hardcoded in the workflow. Teams that carefully curaterouting.mdget no effect from it. -
Wrong assignments are self-sealing. A
squad:*label suppresses later re-triage, so a bad label is worse than no label β it hides itself and cannot be automatically corrected.
This defect class was already fixed once, elsewhere
#1591 fixed "unbounded substring matching + unconditional Lead fallback" for ralph-triage.js. Both defects remain in the bundled squad-triage.yml. The fix appears not to have been applied across both triage paths.
Evidence and its limits
We replaced this workflow locally with word-boundary matching driven by a routing.md signals table, plus explicit ambiguous / unassigned outcomes instead of a Lead fallback.
Measured: our word-boundary implementation against 14 real issues from our repository, using our live team.md / routing.md. Roughly 4 of 14 routed correctly. One issue about PR tooling was confidently assigned to the crawler specialist because its body mentions "workday" once, in passing.
Not measured: stock squad-triage.yml itself. It uses looser substring matching and ignores routing.md, so we expect it to do no better, but we did not benchmark it and are not claiming a number for it.
Our conclusion was that keyword matching is the wrong instrument for this problem, not that it needed better keywords. We have disabled automatic assignment entirely and reduced our workflow to queueing (opened β add squad), leaving triage to the Lead at session start.
Suggestions
Roughly in order of effort:
- Stop attributing keyword output to the Lead. Even keeping the current logic, retitle the comment so it does not read as agent analysis. This is a small change and independently worthwhile.
- Add word boundaries and an explicit no-match outcome instead of the Lead fallback.
- Actually consume
routing.md, since it is already read. - Consider LLM-based triage.
actions/ai-inferencewithpermissions: models: readruns onGITHUB_TOKENwith no additional secret, which fits Squad's existing GitHub-native posture. Reading an issue and matching it to a roster is a natural language task; this seems closer to what Squad's own doctrine describes when it says the Lead "reads the issue, analyzes it, and assigns the correct label."
Happy to contribute a PR for 1β3 if that would help.
Found while auditing our local fork of this workflow. Squad CLI 0.13.1.
Activity
Fix assignment safety, roster parsing, and Ralph authority (#2156)
bradygaster commentedon Nov 17, 2026
One more gap, in the same
findLeadpath: who triages is hard-coded, and there's no setting to change it. (Found onrelease/prepare-2.0.0-preview.5@38d45d02, package version2.0.0-preview.6.)The generated
squad-triage.yml,ralph-triage.jsand the SDK's Ralph triage all pick the first member whose role contains the wordlead, then the first whose role containsarchitect.team.md,routing.mdand.squad/config.jsonhave no way to override this.Here is the stock
findLeadrun against two rosters:No Lead role found in team roster β cannot triageand returns, so nothing is triagedThe only workarounds are adding "Lead" to a role name, or editing the workflow. Editing doesn't last, because
squad upgradeoverwrites the workflow (overwriteOnUpgrade: true).Suggestion, alongside the fixes above: make the triager configurable, for example with a
Triagerow inrouting.mdor atriage: <member-id>key in.squad/config.json. Keep lead/architect as the default, and have all three paths read the same setting. When nothing matches, fall back to the explicit "unassigned / needs-triage" outcome proposed here instead of skipping silently.Source:
packages/squad-cli/templates/workflows/squad-triage.yml:findLeadat lines 98β105, early return at 221β225packages/squad-cli/templates/ralph-triage.js:findLeadFallbackat line 369 (an identical copy is inpackages/squad-sdk/templates/ralph-triage.js)packages/squad-sdk/src/ralph/triage.ts:findLeadFallbackat line 414π€ Generated with Claude Code