בס״ד

WhatsApp Capture — v0 bridge + next-build spec

docs/action-queue/WHATSAPP_CAPTURE.md · last changed (pre-VM history) · rendered from GitHub master

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"

  1. Get Clipboard
  2. If clipboard is empty → Alert: "Copy WhatsApp messages first." → Stop
  3. Ask for Input (menu): "Who is this thread with?" → free text (e.g. Natalie, vendor name)
  4. Choose from Menu: STR · Cleaner · Vendor · Client · Family · Admin · Other
  5. Text action builds the message body:
    WA [{lane}] {who}: {clipboard}
  6. 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 are token/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 word NOTE routes it to INBOX capture (no card spawned — capture first). Proven 6/21: a test NOTE returned ✅ Captured.
    - URL = the webhookUrl and secret = the inboxSecret, BOTH in command-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.
  7. Show Notification: "WhatsApp captured ✓"

v0 acceptance test

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.

Hard NOs (your rules, locked)

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.

Source trail · docs/action-queue/WHATSAPP_CAPTURE.md @ master · rendered 2026-07-02 7:23 PM EDT by scripts/build-docs.py · the .md in the repo is the truth; this page is the phone-readable view