# Speed-to-Lead workflow — reference implementation + eval-set

**Deliverable for: "Speed-to-Lead workflow build + eval-set (n8n/Make/API)"**

## What's here
- `speed_to_lead.py` — dependency-free Python engine: lead capture → classification
  (spam / urgent / business-hours / after-hours / duplicate) → routing → first-touch
  response, with per-industry copy for real estate, dental, legal, home services.
- `eval_set_output.json` — 30 borderline cases (spam-suspect, after-hours, urgent,
  empty-name, duplicate-window, mixed industries) with the branch fired, first-touch
  latency, message, and hash.

## Behavior
| Signal | Route | Response |
|---|---|---|
| Spam terms / no contact | `spam_hold` | none (quarantine) |
| Urgent + after-hours | `urgent_escalation` | escalation string |
| Business hours | `standard` | industry first-touch reply |
| After hours | `after_hours` | confirmation + emergency phone |
| Duplicate within 5 min | flagged | dedupe |

## Wiring
Call `process()` from your form webhook (or n8n/Make HTTP node) and persist the audit
record. The `message_hash` is the idempotency key. SLA: first-touch under 5 minutes.

## Run
```bash
python3 speed_to_lead.py
```
