Skip to content

feat: CommunicationAdapter — platform-agnostic agent-human communication #261

Closed

Description

@tamirdresher

CommunicationAdapter — Platform-agnostic agent-human communication

Problem

Squad agents need to communicate with humans (status updates, decisions, escalations, questions). Currently this is ad-hoc — some users use Teams webhooks, some rely on GitHub issue comments, ADO users have Work Item discussions. There is no unified abstraction.

Related discussion: #242 (Dina wants phone-capable comms, Brady wants no GitHub lock-in).

Proposal

Add a CommunicationAdapter interface to the platform layer, alongside the existing PlatformAdapter:

interface CommunicationAdapter {
  postUpdate(channel: string, message: string, options?: { format?: "text" | "card" }): Promise<void>;
  pollForReplies(channel: string, since: Date): Promise<Reply[]>;
  getNotificationUrl(channel: string): string;
}

Implementations

Adapter Phone-capable Corp-only Setup Notes
GitHubDiscussionsAdapter Yes (browser) No Zero Uses gh api or GitHub MCP. Categories map to signal types.
ADOWorkItemDiscussionAdapter Yes (ADO mobile) Depends Zero Comment threads on work items. Already have az CLI wiring.
TeamsWebhookAdapter Yes (Teams mobile) Yes Low Outbound via webhook, inbound via WorkIQ polling or Power Automate.
FileLogAdapter (fallback) Via git client No Zero Writes to .squad/log/ — always available, lowest common denominator.

Integration Points

  • Scribe posts session summaries to the configured channel after significant work
  • Ralph posts board status during idle-watch check-ins
  • Coordinator posts escalations when agents are blocked
  • Agents can post decisions that need async human review
  • Config in .squad/config.json under a communications key

Prototype

A working Teams webhook + WorkIQ polling prototype exists (tested on a separate machine). The pattern:

  • Outbound: POST to Teams webhook URL (plain text, not adaptive cards for mobile copy-ability)
  • Inbound: WorkIQ MCP tool polls Teams channel for replies matching a unique thread ID
  • Deduplication via message timestamp tracking

Acceptance Criteria

  • CommunicationAdapter interface in packages/squad-sdk/src/platform/types.ts
  • GitHubDiscussionsAdapter implementation
  • ADOWorkItemDiscussionAdapter implementation (leverages existing ADO adapter)
  • TeamsWebhookAdapter implementation (from prototype)
  • FileLogAdapter fallback (always available)
  • Scribe integration — posts to channel after agent batches
  • Config schema in .squad/config.json
  • squad init offers channel setup as optional post-init step
  • Docs: communication channel setup per platform
  • Phone-capable: all adapters except FileLog work on mobile

Non-Goals (for this issue)

Activity

  1. tamirdresher commented on Mar 8, 2026

    @tamirdresher
    CollaboratorAuthor

    Completed — PR #263 merged the CommunicationAdapter with 4 implementations (FileLog, GitHub Discussions, ADO Work Item Discussions, Teams webhook stub), factory with auto-detection, and 15 tests. Remaining items (Teams full implementation, Scribe integration) tracked as Phase 2 in the issue description.

  2. added a commit that references this issue on Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions