-
Notifications
You must be signed in to change notification settings - Fork 88
Description
Problem
The squad triage command (aliases: watch, loop) is documented as auto-triaging issues to the team, but the implementation in src/cli/commands/triage.ts does not wire the polling loop to the team assignment engine. Running squad triage --interval 5 starts polling but issues are never routed to team members.
Root Cause
In src/cli/commands/triage.ts, the execute() method calls startPolling() but does not bind the issue event stream to TeamAssignmentEngine.dispatch(). The polling loop collects issues from GitHub but does not invoke team routing logic.
Comparison:
- What works:
squad copilot --auto-assignsuccessfully routes issues to the Copilot agent viasrc/agents/copilot.ts:assignIssue() - What's broken:
squad triagecollects issues but the next step (team dispatch) is missing
Impact
Users run squad triage expecting their team members to automatically claim issues and propose work, but nothing happens. The feature is advertised in the README and CLI help text but is non-functional.
Expected Behavior
- User runs
squad triage --interval 10 - CLI polls GitHub issues every 10 minutes
- For each new/unassigned issue,
TeamAssignmentEngine.dispatch(issue)is called - Engine evaluates team member expertise and assigns the issue
- Assigned team member (
Backend,Frontend,Tester,Lead) generates a comment with work proposal
What Needs to Happen
Wire the polling event stream to team dispatch in src/cli/commands/triage.ts:
// After GitHub issue is fetched, dispatch to team:
await TeamAssignmentEngine.dispatch({
issue: githubIssue,
teamContext: this.loadedTeam,
assignmentStrategy: 'expertise-match'
});This mirrors the existing pattern in src/agents/copilot.ts:assignIssue(), which already successfully routes work to Copilot.
Scope
- Update
src/cli/commands/triage.ts:execute()to callTeamAssignmentEngine.dispatch()on each polled issue - Add integration test in
tests/cli/triage.test.tsto verify dispatch is called (currently missing) - Verify polling interval is respected and does not trigger duplicate assignments
Why This Matters
Persistent Ralph (#236) depends on this working. Without functioning squad triage, the team cannot autonomously watch and respond to issues. This is a core feature advertised in the pitch.
Contributed by Klement Gunndu