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 Alpha → client-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
Problem
When
squads-clicreates 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
bin/squads-slack) and can post to existing channels.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
--slackflag on relevant commands (squads add <name> --slack).squads/config.yml— e.g.slack.auto_create_channels: true.squads/hooks/post-add.shthat users can wire to anythingAuth
SLACK_BOT_TOKENenv varconversations.createwithnameandis_private— needschannels:managescopeFailure handling
Naming
Client Alpha→client-alpha)-2,-3? Or fail with a clear message?Out of scope
References
src/commands/create.tsAcceptance criteria