Skip to content

CLI command wiring: squad triage does not trigger team assignment loop #248

@KlementMultiverse

Description

@KlementMultiverse

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-assign successfully routes issues to the Copilot agent via src/agents/copilot.ts:assignIssue()
  • What's broken: squad triage collects 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

  1. User runs squad triage --interval 10
  2. CLI polls GitHub issues every 10 minutes
  3. For each new/unassigned issue, TeamAssignmentEngine.dispatch(issue) is called
  4. Engine evaluates team member expertise and assigns the issue
  5. 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 call TeamAssignmentEngine.dispatch() on each polled issue
  • Add integration test in tests/cli/triage.test.ts to 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    go:needs-researchNeeds investigationrelease:v0.8.22Release v0.8.22squadSquad triage inbox — Lead will assign to a membersquad:fensterAssigned to Fenster (Core Dev)squad:hockneyAssigned to Hockney (Tester)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions