Update README for tasks, reminders, calendar, and CI/CD pipeline

This commit is contained in:
Adam Moussa 2026-05-05 10:44:37 -04:00
parent 1d9b8de8b3
commit c03f951947

View file

@ -1,6 +1,6 @@
# Exec Aide (Lauren)
Personal AI executive assistant for Adam Moussa. Monitors Gmail inbox, classifies emails by urgency using Claude Haiku (Bedrock), delivers Slack alerts and daily digests, and supports two-way conversation via Slack DM and @mentions in channels.
Personal AI executive assistant for Adam Moussa. Monitors Gmail inbox, classifies emails by urgency using Claude Haiku (Bedrock), delivers Slack alerts and daily digests, manages tasks and reminders, integrates with Google Calendar, and supports two-way conversation via Slack DM and @mentions in channels.
## Architecture
@ -8,17 +8,21 @@ Personal AI executive assistant for Adam Moussa. Monitors Gmail inbox, classifie
EventBridge (15 min) → fetch-classify Lambda → Gmail API → Bedrock Haiku → DynamoDB + Slack DM
EventBridge Scheduler (5 PM ET M-F) → daily-digest Lambda → DynamoDB + Gmail API → Slack DM
Fargate (Socket Mode) → Slack listener → conversation Lambda → Bedrock Sonnet + tools → Slack reply
EventBridge Scheduler (one-shot) → reminder Lambda → Slack DM
```
**Stack:** CDK (TypeScript), stack name `exec-aide`, region us-east-1
**CI/CD:** CodePipeline + CodeBuild — auto-deploys on push to `main`. Pipeline stack: `exec-aide-pipeline`.
### Services
- **exec-aide-fetch-classify** (Lambda): Polls Gmail via History API every 15 minutes, classifies each new message via Bedrock Haiku, filters out marketing, sends immediate Slack DM for HIGH priority, tracks thread state for unanswered detection.
- **exec-aide-daily-digest** (Lambda): Runs weekdays at 5 PM ET (DST-aware). Summarizes high-priority items, bypassed work orders, and unanswered threads older than 24h.
- **exec-aide-conversation** (Lambda): Bedrock Sonnet-powered conversational assistant. Handles multi-turn conversations with tool use for inbox queries, Gmail search, coordination threads, and on-demand digest triggers. Channel-aware: declines private info in public channels. Invoked asynchronously by the listener.
- **exec-aide-conversation** (Lambda): Bedrock Sonnet-powered conversational assistant. Handles multi-turn conversations with tool use for inbox queries, Gmail search, coordination threads, calendar management, tasks, reminders, and on-demand digest triggers. Channel-aware: declines private info in public channels. Invoked asynchronously by the listener.
- **exec-aide-reminder** (Lambda): Receives one-shot EventBridge Scheduler invocations and sends reminder text as a Slack DM to Adam.
- **exec-aide-listener** (Fargate): Socket Mode Slack bot. Handles DMs (with "Thinking..." placeholder UX), @mentions in channels (flat or threaded replies), and coordination thread routing. Runs in a dedicated VPC (10.30.0.0/16) on ARM64.
- **DynamoDB `exec-aide`**: Single-table design (MSG#, THD#, META#, CONV#, COORD# prefixes). GSI `by-date` for daily digest queries. 90-day TTL (7-day for COORD).
- **DynamoDB `exec-aide`**: Single-table design (MSG#, THD#, META#, CONV#, COORD#, TASK# prefixes). GSI `by-date` for daily digest queries. 90-day TTL (7-day for COORD).
### Conversation Tools
@ -35,10 +39,18 @@ The conversation Lambda has access to these tools:
| `trigger_daily_digest` | Send a digest on demand |
| `search_inbox` | Full Gmail search with query syntax |
| `coordinate_with_user` | Start a coordination thread with someone in a channel |
| `create_task` | Add a task to Adam's to-do list |
| `list_tasks` | Show open tasks |
| `complete_task` | Mark a task as done |
| `delete_task` | Remove a task |
| `create_reminder` | Schedule a one-shot reminder DM at a specific time |
| `list_calendar_events` | List upcoming Google Calendar events |
| `create_calendar_event` | Create a new calendar event |
| `check_availability` | Check free/busy status for a time range |
### CDK Constructs
- `lib/constructs/email-pipeline.ts` — DynamoDB table, all three Lambda functions, EventBridge schedules
- `lib/constructs/email-pipeline.ts` — DynamoDB table, all four Lambda functions (fetch-classify, daily-digest, conversation, reminder), EventBridge schedules
- `lib/constructs/socket-mode.ts` — VPC, ECS cluster, Fargate service, ECR repo (image built automatically via `ContainerImage.fromAsset()`)
## Classification Rules
@ -55,19 +67,21 @@ The conversation Lambda has access to these tools:
## Prerequisites
- AWS CDK CLI (`npm install -g aws-cdk`)
- Node.js 18+, Python 3.12
- Node.js 22+, Python 3.12
- Docker (for Lambda bundling and Fargate image builds)
- Gmail API enabled in Google Cloud Console (project: `exec-aide`)
- Gmail API enabled in Google Cloud Console (project ID: `332395266465`)
- Google Calendar API enabled in Google Cloud Console (same project)
- Slack app "Exec Aide" with Socket Mode enabled
## One-Time Setup
### 1. Gmail OAuth
### 1. Google OAuth (Gmail + Calendar)
```bash
pip install google-auth-oauthlib
python scripts/get_gmail_token.py --client-secrets-file path/to/client_secret.json
# Authorize as adam@seahavenind.com, copy output to Secrets Manager
python scripts/get_gmail_token.py --client-secrets-file ~/.ssh/client_secret_332395266465-mn83qrihoq45njpaiu448rsml1v02f5r.apps.googleusercontent.com.json
# Authorize as adam@seahavenind.com (grants gmail.readonly + calendar scopes)
# Copy output JSON to Secrets Manager
```
### 2. Secrets Manager
@ -90,6 +104,8 @@ python scripts/get_gmail_token.py --client-secrets-file path/to/client_secret.js
## Deploy
Pushes to `main` trigger the CI/CD pipeline automatically. For manual deployment:
```bash
npm install
cdk deploy