feat: Alex rollout — persona, Socket Mode, payments, channels, App Home, unanswered questions #9

Merged
amoussa1229 merged 3 commits from feature/alex-rollout into main 2026-04-30 22:57:23 +00:00
amoussa1229 commented 2026-04-30 21:00:42 +00:00 (Migrated from github.com)

Summary

  • Alex persona: Renamed agent to seahaven-alex with friendly/professional coworker identity
  • Socket Mode: Replaced HTTP webhook Lambda with ECS Fargate service (@slack/socket-mode) for persistent WebSocket connection to Slack
  • Payment lookups: 3 new action group functions (lookup_payment_by_vendor, lookup_payment_by_invoice, lookup_payment_by_check) reading PaymentsDashboard DynamoDB table
  • Channel support: Handles both DMs (message.im) and @mentions (app_mention) in any channel
  • Verified sites: Replaced manually-seeded SiteAssignments table with auto-populated verified-sites (owned by po-ingest)
  • App Home: New Lambda publishes Block Kit capabilities view to Slack App Home tab
  • Unanswered questions: Keyword-based detection logs gaps to seahaven-unanswered-questions DynamoDB table (180-day TTL)
  • Compliance: All Lambdas now use arm64 + explicit 60-day log retention

Files changed

Area Files
CDK constructs bedrock-agent.ts, slack-handler.ts, conversation-log.ts, socket-mode.ts (new), notion-sync.ts, po-sync.ts, workorder-sync.ts
Stack wiring seahaven-slack-bot-stack.ts
Lambdas slack-processor/index.ts, wo-po-lookup/index.ts, app-home/index.ts (new)
Socket Mode service services/socket-mode/ (new — Dockerfile, TypeScript, package.json)
Removed lambda/slack-webhook/index.ts, scripts/seed-sites.ts

Test plan

  • CDK deploy succeeds
  • DM Alex — verify "Alex is thinking..." placeholder and persona in responses
  • Site lookup — "Where is ABE2?" returns data from verified-sites
  • Payment lookup — "Has [vendor] been paid?" returns PaymentsDashboard results
  • Channel @mention — @Alex in a channel gets threaded reply
  • App Home — click Alex profile, verify capabilities view
  • Unanswered detection — ask something unanswerable, check seahaven-unanswered-questions table
  • No regressions — vendor, WO/PO, and policy lookups still work
## Summary - **Alex persona**: Renamed agent to `seahaven-alex` with friendly/professional coworker identity - **Socket Mode**: Replaced HTTP webhook Lambda with ECS Fargate service (`@slack/socket-mode`) for persistent WebSocket connection to Slack - **Payment lookups**: 3 new action group functions (`lookup_payment_by_vendor`, `lookup_payment_by_invoice`, `lookup_payment_by_check`) reading `PaymentsDashboard` DynamoDB table - **Channel support**: Handles both DMs (`message.im`) and @mentions (`app_mention`) in any channel - **Verified sites**: Replaced manually-seeded `SiteAssignments` table with auto-populated `verified-sites` (owned by po-ingest) - **App Home**: New Lambda publishes Block Kit capabilities view to Slack App Home tab - **Unanswered questions**: Keyword-based detection logs gaps to `seahaven-unanswered-questions` DynamoDB table (180-day TTL) - **Compliance**: All Lambdas now use arm64 + explicit 60-day log retention ## Files changed | Area | Files | |------|-------| | CDK constructs | `bedrock-agent.ts`, `slack-handler.ts`, `conversation-log.ts`, `socket-mode.ts` (new), `notion-sync.ts`, `po-sync.ts`, `workorder-sync.ts` | | Stack wiring | `seahaven-slack-bot-stack.ts` | | Lambdas | `slack-processor/index.ts`, `wo-po-lookup/index.ts`, `app-home/index.ts` (new) | | Socket Mode service | `services/socket-mode/` (new — Dockerfile, TypeScript, package.json) | | Removed | `lambda/slack-webhook/index.ts`, `scripts/seed-sites.ts` | ## Test plan - [x] CDK deploy succeeds - [x] DM Alex — verify "Alex is thinking..." placeholder and persona in responses - [x] Site lookup — "Where is ABE2?" returns data from `verified-sites` - [x] Payment lookup — "Has [vendor] been paid?" returns PaymentsDashboard results - [x] Channel @mention — `@Alex` in a channel gets threaded reply - [x] App Home — click Alex profile, verify capabilities view - [x] Unanswered detection — ask something unanswerable, check `seahaven-unanswered-questions` table - [x] No regressions — vendor, WO/PO, and policy lookups still work
This repo is archived. You cannot comment on pull requests.
No description provided.