ComeHomeAlabama · Lead Edge

Lead Edge — pipeline architecture

The residential lead engine as it exists in the repo: four source handlers feed a fail-closed compliance gate, clean leads are enriched, scored and drafted by Claude, then dispatched to the closers' tools. Every box traces to a source file.

Lead Edge — pipeline architecture Nine components in a left-to-right pipeline. Lead sources (BatchLeads, Vulcan7, sphere, STR cross-reference) flow into per-source handlers, then into the focal compliance gate which enforces DNC scrubbing and the service-area zip list and rejects failures before any money is spent. Clean leads pass to enrichment, then to the Claude plane where Haiku scores and Sonnet drafts, then to dispatch, which re-runs the compliance gate at send time and pushes SMS and email out via Twilio and Resend. The sink writes the audit row and the lead into Twenty CRM and alerts Slack. CLEAN ONLY SMS + EMAIL Lead sources — external cluster of 4: BatchLeads API, Vulcan7, sphere drip, STR cross-reference (src/integrations/batchleads.py, src/integrations/vulcan7.py) EXT Lead sources BatchLeads · Vulcan7 · +2 Handlers — per-source normalizers, one per LeadSource (src/handlers/batchleads_daily.py, vulcan7_daily.py, sphere_drip.py, str_xref_weekly.py) SRC Handlers src/handlers · 4 feeds Compliance gate — DNC scrub + service-area zip list, fail-closed, 100% covered (src/orchestrator/compliance.py) (focal) GATE Compliance gate DNC + zip · fail-closed Enrich — provider field enrichment stage (src/orchestrator/enrich.py) STG Enrich provider fields Score + Draft — Claude plane: Haiku 4.5 scores HOT/WARM/COLD, Sonnet 5 drafts outreach (src/orchestrator/score.py, draft.py, src/integrations/anthropic_client.py) AI Score + Draft Haiku 4.5 · Sonnet 5 Dispatch — send stage, re-runs the compliance gate at send time (src/orchestrator/dispatch.py) STG Dispatch re-runs DNC gate Outbound — Twilio SMS and Resend email clients (src/integrations/twilio_client.py, resend_client.py) EXT Outbound Twilio SMS · Resend Sink — audit row + CRM write stage (src/orchestrator/sink.py) STG Sink audit row · CRM write Twenty CRM + Slack — the closers' queue and alert channel (src/integrations/twenty_client.py, slack_client.py) EXT Twenty CRM · Slack closer queue · alerts LEGEND FOCAL GATE PIPELINE STAGE EXTERNAL SERVICE HTTP / API

Grounded in coastal-realty-ops src/ · drawn 2026-08-19