WhatsApp Capture — v0 bridge + next-build spec
Generated: Sunday, June 21, 2026 · 3:10 AM ET
Strategic rule: Capture first. Normalize second. Act third. Automate last.
THE DECISION (why I did NOT build the Worker endpoint tonight)
Your spec asked for POST /intake/whatsapp/manual on the ops-api Worker. I am not deploying that at 3am, on purpose, because it trips three of your own stop rules:
- The ops-api Worker is the #042 / command-inbox session's lane — deploying a new live route there blind = clobbering a parallel session.
- It's a live money/ops Worker — a new untested route on it at 3am violates "build once, prove, then scale."
- Your stop rule literally says: stop before any build not required for the manual intake, and stop if the existing Worker route is unclear.
So the smallest safe bridge = reuse what already exists and needs no deploy: the iOS Shortcut posts into your existing command inbox (the confirmed source of truth, already live, already secret-gated). You get WhatsApp capture working today with zero new infrastructure. The richer D1 ledger + dedicated endpoint is spec'd below as the next daylight build for the owning session.
v0 — WORKS NOW, NO DEPLOY (iOS Shortcut → existing command inbox)
The command inbox already accepts commands via its live web app (the same one scripts/inbox.ps1 hits). The Shortcut posts a structured NOTE so the capture lands as a card with source + lane tags.
Shortcut: "Capture WhatsApp to Command Inbox"
- Get Clipboard
- If clipboard is empty → Alert: "Copy WhatsApp messages first." → Stop
- Ask for Input (menu): "Who is this thread with?" → free text (e.g. Natalie, vendor name)
- Choose from Menu: STR · Cleaner · Vendor · Client · Family · Admin · Other
- Text action builds the message body:
WA [{lane}] {who}: {clipboard} - Get Contents of URL → POST to the command-inbox web app:
- Method: POST, Header:Content-Type: application/json
- Body (VERIFIED LIVE CONTRACT 2026-06-21 — the real web-app fields aretoken/input/source/sender, NOT secret/cmd/text):
{"token":"<INBOX_SECRET>","input":"NOTE WA [{lane}] {who}: {clipboard}","source":"whatsapp-shortcut","sender":"Sam"}
-input= the command line exactly as a phone message: first wordNOTEroutes it to INBOX capture (no card spawned — capture first). Proven 6/21: a test NOTE returned✅ Captured.
- URL = thewebhookUrland secret = theinboxSecret, BOTH incommand-inbox/.claude-notify.json(gitignored, local-only). They live ONLY in your personal Shortcut + that file — never in this committed doc, never on a public page. - Show Notification: "WhatsApp captured ✓"
v0 acceptance test
- Copy a WhatsApp thread → run Shortcut → a NOTE card appears in the command inbox within ~30s, tagged
WA [lane] who:. - Re-running the same copy doesn't spam (NOTE is idempotent-ish; full dedupe comes in v1).
This is enough to end the failure mode: an urgent cleaner/vendor message becomes a visible card instead of a blind spot — Sam-or-Mildred-handled stops being ambiguous.
v1 — NEXT BUILD (daylight, owning session) — the real ledger
Only build after v0 proves the habit sticks. This is the POST /intake/whatsapp/manual + D1 communication ledger from your spec.
- Endpoint:
POST /intake/whatsapp/manualon ops-api Worker (secret-gated header, reject emptyraw_text, generateevent_id, dedupe bysource+captured_by+conversation_name+hash(raw_text)+date-bucket, return{ok,event_id,stored}). - Store: D1
communication_ledgertable (full field set from the handoff §9.2: source, channel, direction, counterparty, lane, urgency, owner, status, suggested_reply, proof, privacy_class, related_cards, dedupe_key). - AI enrich: summarize + extract action → optional
POST /cards/from-eventto the command inbox. - Privacy gate: classify
privacy_classbefore any AI processing; never expose family/financial on public pages.
Hard NOs (your rules, locked)
- Do NOT migrate the existing WhatsApp Business number (Sam + Mildred lose native app use).
- Do NOT scrape WhatsApp Web. Do NOT build a periodic sweep as the architecture.
- Do NOT auto-reply (draft-only until governance proven).
- Twilio = only for a NEW pilot number / LevSMS, never the existing shared number.
- Research WhatsApp Business App + Cloud API Coexistence before ANY number move.
Media (the real reason this matters — vendors send photos/voice notes)
Clipboard v0 = text only. Photos/voice need v1 API capture (provider webhook → Worker downloads media → transcribe audio / summarize image → ledger). That's the payoff that justifies v1, not v0.
Boarding-pass / flight note (from the handoff, privacy-scoped)
El Al LY001 TLV→JFK Jun 21, boards 00:05, seat 47K. Pickup est. curbside ~6:15–6:45 AM JFK (reverify live flight status before leaving). Not storing passenger name / QR / barcode — privacy rule.