Skip to content

feat: auto-create Slack channels when new squads or memory entities are added #763

@kokevidaurre

Description

@kokevidaurre

Problem

When squads-cli creates new directories — squads (squads add <name>) or memory entities (e.g., new entries under .agents/memory/customer/<name>/) — there's no automatic creation of a matching Slack channel. Users who run a Slack-integrated workflow have to create channels manually each time, which means new entities go un-discussed and team awareness lags.

Current state

  • The Slack bot exists (bin/squads-slack) and can post to existing channels.
  • Channel IDs are tracked in private memory (squad-company, squad-cli, etc.).
  • No integration point between directory-creation events in the CLI and channel-creation in Slack.

Proposed behaviour

When the CLI creates a new persistent entity (squad, or new memory subdirectory under a configured root), it should optionally trigger Slack channel creation with a predictable naming convention (e.g. squad-<name> for squads, <entity-type>-<name> for memory entities).

Design questions to resolve

Trigger point

  • Option A: New --slack flag on relevant commands (squads add <name> --slack)
  • Option B: Project-level config in .squads/config.yml — e.g. slack.auto_create_channels: true
  • Option C: Post-create hook in .squads/hooks/post-add.sh that users can wire to anything

Auth

  • Slack bot token via SLACK_BOT_TOKEN env var
  • API: conversations.create with name and is_private — needs channels:manage scope
  • Channel ID needs to persist somewhere for future posts (memory file or config file)

Failure handling

  • If Slack API call fails (rate limit, name collision, missing scope), the directory creation should still succeed and the failure should be logged — never block local work on Slack availability

Naming

  • Slack channel names: lowercase, no spaces, max 80 chars, hyphens/underscores
  • Need a transform from the user-supplied name (e.g. Client Alphaclient-alpha)
  • Collision strategy: append -2, -3? Or fail with a clear message?

Out of scope

  • Two-way sync (Slack channel deleted → local dir deleted): dangerous
  • Auto-archiving channels when entities are removed: defer
  • Posting an introductory message in the new channel: nice-to-have, not core

References

Acceptance criteria

  • User can opt in to Slack channel auto-creation via one of the trigger options above
  • Channel is created with predictable naming
  • Channel ID persists for use by future Slack posts
  • CLI command succeeds even if Slack API fails (graceful degradation)
  • No entity names exposed by default — opt-in only

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Priority 2 - MediumenhancementNew feature or requestsquad:cliCLI squad

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions