Live at hubv2.apphappenventures.com — ECS Fargate dev. Today it covers ~30% of the vision: 4 read-only domains shipped, the unified human-in-loop task queue with bot identity still missing. This page is the discovery brief in one screen.
Airtable meetings, HubSpot tasks, Robin AI tasks, R3 + Notion tickets. Google OAuth gated to @happenventures.com.
Unified human-in-loop view over the 8 task_queue_* tables, bot identity + signature, real send with delay + retries.
F0 stabilize · F1 unified queue · F2 identity + tools · F3 KPI + training. F0 can start in parallel today.
Event-driven workflow yjrMZbNwqbNTslrD is INACTIVE. Cron workflow wV1Kk3RUwBViEHQP polls every 5min and sends. Both target the same table. Reactivate without deprecating = double send.
On task_queue_sales. Humans spend more time fixing drafts than writing from scratch. Pause autonomy_enabled until prompts are recalibrated.
Jess (ClawBot), Daniela (Paloma), Joan (Robin) — no rotation. Only Olivia has backups. One vacation = backlog.
Prefix /api. Services: hubspot, ai-tasks, tickets, meetings.
App Router, Tailwind v4, shadcn/ui, TanStack Query, Zustand.
claude-sonnet-4-6 SSE for chat. Second client uses Anthropic API direct — needs consolidation.
HV Ops (27), AI Hub (22), R3 Ops (32), HV Hub Base (24), SSOT Finance (10).
323 workflows backed up, ~130 active. Make.com 46 scenarios. Most automation lives here, not in V2.
ALB + ECR + Terragrunt. Cluster hv-hub-v2-development, services hv-hub-v2-{api,web}.
| # | Where | Issue | Effort |
|---|---|---|---|
| 1 | tickets.service.ts:27 | process.env.NOTION_API_KEY bypasses ConfigService. | 30 min |
| 2 | Chat vs ClaudeService | Two clients, two models: Bedrock claude-sonnet-4-6 vs Anthropic claude-sonnet-4-20250514. | ½ day |
| 3 | meetings.service.ts | First-name filter — collision risk (Mario vs Mariana). | 2 h |
| 4 | Airtable / HubSpot calls | Zero cache — every refresh hits API, rate-limit risk. | ½ day |
| 5 | Observability | No consistent Logger, no metrics, no traces. | 1 day |
| 6 | CLAUDE.md | Documents Auth.js v5; code uses manual Google OAuth. Pick one. | 1 h doc |
1. n8n writes to task_queue_* (pending).
2. Hub V2 GET /api/ai-tasks — only Robin + Sales surfaced.
3. User approves/edits/rejects → PATCH Airtable.
4. fireCallback() POSTs to n8n. Today the event-driven workflow is off, so the callback is functionally a no-op — the 5-min cron picks the row up later.
1. GET /api/queue?assigned_to=me unifies all 8 + finance.
2. UI tabs per bot with identity, signature, word-cap visible.
3. QueueService.resolve() — idempotent: PATCH + audit_log + enqueue.
4. BullMQ + Redis send worker → Gmail send-as with delay + retries + dead-letter.
Reactivate or rewrite “Approved → Send” with stuck-approval monitor. Fix tickets.service.ts:27. Consolidate Claude client. Move OWNER_MAP + USER_TICKET_CONFIG to user_integrations table. Add 60s cache on Airtable/HubSpot.
QueueModule: GET /api/queue?assigned_to&bot&status aggregating 8 task_queue_* + Robin + Sales. QueueService.resolve() idempotent with audit_log. UI /queue with tabs per bot. BullMQ + Gmail send-as.
BotIdentityService reads tblRiSakPTB4cVJSr (Bot Settings). UI shows avatar + signature + word-cap. Markdown editor for system_prompt with versioning. Tools panel per bot with RBAC. HV Bot Q&A: RAG over Notion wiki.
Dashboard /kpi: % approved without edit, time-to-action, throughput per bot. Nightly job exports (draft, edited) pairs to S3 for fine-tune. View-as-user impersonation with audit.
| # | Question | Trade-off |
|---|---|---|
| 1 | Functional owner of the unified Task Queue? | Defines default RBAC. |
| 2 | Send delay scope: per bot, per user, or per playbook? | Sales wants 30-90s; Account Manager can be 0s. |
| 3 | “Approved → Send”: reactivate n8n or migrate to V2 worker? | Speed vs ownership. |
| 4 | Bot identity: one signature per bot, or per (bot × playbook)? | Bot Settings has one slot today. |
| 5 | Consolidate on Bedrock or Anthropic API direct? | One client, one model. |
| 6 | Word-cap 150 vs 250 (Account Mgr vs Sales)? | Freeze one or store per bot. |
| 7 | Operating hours 7-8pm vs 8am-6pm ET? | Drives nightly suppression. |
| 8 | Hub V2 reads Airtable directly or via hv-data-platform? | Cache + scalability ceiling. |
| 9 | Event-driven (reactivate v2 + kill cron) or cron (deprecate v2)? | Event = 0s latency + idempotency burden. Cron = works today, 0-5min latency, no explicit retries. |
tickets.service.ts:27 — coherence + secret management.
Airtable + HubSpot responses. Instant UX, fewer rate-limits.
Slack alert if >30min without send. Catches Risk #1.
/api/queue/counts for sidebar badges. Jess asked for it.
Set autonomy_enabled=false until recalibrated. Stops the 76% reject bleed.
Onboarding for 4 devs.
There is no silent email loss — there is unowned redundancy on tblPXhWpS79NvLmh9.
| Workflow | ID | Active | Trigger | Path |
|---|---|---|---|---|
| ClawBot: Approved → Send → Log (v2) | yjrMZbNwqbNTslrD | off | Airtable poll “Approved Ready to Send” | Filter → Signature → Set Sending → RFC-2822 → Gmail → HubSpot log → Mark Sent |
| Send Approved Tasks | wV1Kk3RUwBViEHQP | on | Schedule every 5 min | HTTP proxy → Limit → Loop → Suppression → 14d cooldown → Gmail → Cadence stepper |
Hub v2's NestJS API is the natural home for everything n8n does today. Three roles collapse into native modules: @Cron decorators for schedules, controllers for webhooks, services for integrations. No infra additions — ECS Fargate + Secrets Manager are already provisioned.
scheduleTrigger fires → POST to 187.77.29.73:8788 with HTTP Basic in URL. Same password in every JSON.
In Hub v2: ClawbotScheduleModule with one @Cron method per playbook. Secrets Manager injects auth. ~1 day per batch of 5 callers.
Inbound email/forms/Slack → parse → write Airtable robin_tasks. Real logic lives in n8n nodes.
In Hub v2: @Controller('/ingest/*') + class-validator DTOs + AirtableService. Versioned, testable. 3-5 days.
HubSpot ↔ Airtable sync, WhatsApp notifs, ad-hoc one-offs. Lowest volume, highest variety.
In Hub v2: dedicated IntegrationsModule per surface, behind feature flags. 1-2 weeks rolling.
The target architecture originally proposed EventBridge for the 16 schedules. Re-evaluation: Hub v2 already runs NestJS on ECS Fargate with Secrets Manager and CloudWatch. Adding @nestjs/schedule is one dependency — EventBridge is an extra surface to wire, monitor and pay for. Keep EventBridge as the fallback if we ever need cross-service triggers; for now the scheduler lives where the code lives.
Take questions 1–8 (plus K's question 9) to a 30-min session with Jess. With those answered, F0 can start in parallel today — all six F0 tasks are independent and low-risk. Workspace audit coverage: 80% (pending: 17 Netlify legacy functions, full system_prompts, executive docs, drawio renders).