Skip to content

feat(slack): add Slack integration with @mention-based task submission#42

Open
isadeks wants to merge 1 commit intoaws-samples:mainfrom
isadeks:main
Open

feat(slack): add Slack integration with @mention-based task submission#42
isadeks wants to merge 1 commit intoaws-samples:mainfrom
isadeks:main

Conversation

@isadeks
Copy link
Copy Markdown

@isadeks isadeks commented Apr 20, 2026

Summary

  • Adds full Slack integration: submit tasks via @Shoof mentions or DMs, receive threaded notifications with emoji reaction progress
  • OAuth multi-workspace install flow with bgagent slack setup CLI wizard for zero-friction onboarding
  • Account linking via /bgagent link slash command
  • Cancel button with instant feedback, session message cleanup on completion

What's included

CDK Constructs: SlackIntegration, SlackInstallationTable, SlackUserMappingTable

Lambda Handlers: slack-events, slack-commands, slack-command-processor, slack-interactions, slack-oauth-callback, slack-link, slack-notify

Shared Utilities: slack-verify (HMAC signature verification), slack-blocks (Block Kit renderer)

CLI: bgagent slack setup (interactive wizard), bgagent slack link <code> (account linking)

Docs: SLACK_SETUP_GUIDE.md with screenshots, Developer Guide updated

UX Flow

  1. User mentions @Shoof fix the bug in org/repo#42
  2. 👀 reaction appears instantly
  3. Task created → ⏳ reaction, threaded notification with Cancel button
  4. Agent completes → ✅ reaction, "Task completed" with View PR button, session message deleted

Other changes (non-Slack)

  • Blueprint repo via context/env var: cdk deploy -c blueprintRepo=org/repo or BLUEPRINT_REPO=org/repo — no longer requires editing agent.ts directly. Developer Guide updated with the new method.
  • X-Ray tracing commented out: Requires account-level UpdateTraceSegmentDestination setup that blocks first-time deploys. Disabled to unblock new users; re-enable once the prerequisite is documented more clearly.

Test plan

  • bgagent slack setup — full flow from scratch (deploy, create app, credentials, install, link)
  • @Shoof mention in channel — happy path with reactions and threaded notifications
  • Cancel button mid-task — instant feedback and cleanup
  • Error cases: no repo, repo not onboarded, unlinked user
  • DM to Shoof — private task submission
  • /bgagent help and /bgagent link
  • Multi-workspace: second workspace installs via OAuth URL
  • -c blueprintRepo=org/repo deploys with custom repo onboarded

@isadeks isadeks force-pushed the main branch 3 times, most recently from aef74c1 to 833c770 Compare April 20, 2026 17:03
Adds full Slack integration enabling users to submit coding tasks by
mentioning @shoof in any channel or DM, with real-time emoji reactions
and threaded notifications showing task progress.

Key features:
- @mention task submission with natural language repo extraction
- Emoji reaction progression: 👀 → ⌛ → ✅
- Threaded notifications (created, started, completed/failed)
- Cancel button with instant feedback
- DM support for private task submissions
- OAuth multi-workspace install flow
- `bgagent slack setup` CLI wizard for zero-friction onboarding
- Account linking via /bgagent link

New files:
- CDK constructs: SlackIntegration, SlackInstallationTable, SlackUserMappingTable
- Lambda handlers: events, commands, command-processor, interactions,
  oauth-callback, link, notify
- Shared utilities: slack-verify, slack-blocks
- CLI: slack.ts (setup, link commands)
- Docs: SLACK_SETUP_GUIDE.md with screenshots
@isadeks isadeks marked this pull request as ready for review April 20, 2026 17:31
@isadeks isadeks requested a review from a team as a code owner April 20, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant