# LeadPilot — Lead Lifecycle & Workflows

**Document Version:** 1.0.0 (Phase 7 Lead Management Lock)  
**Status:** Implemented & Verified  

---

## 1. Linear Sales Funnel Progression

```
[ New Enquiry ] ────────► [ First Contact ] ────────► [ Qualified ]
      │                          │                          │
      ▼                          ▼                          ▼
(Stage: `new`)          (Stage: `contacted`)       (Stage: `qualified`)
                                                            │
                                                            ▼
                                                    [ Proposal Sent ]
                                                     (Stage: `proposal`)
                                                            │
                                             ┌──────────────┴──────────────┐
                                             ▼                             ▼
                                      [ Deal Won ]                   [ Deal Lost ]
                                    (Stage: `won`)                  (Stage: `lost`)
                                    `won_at = now()`                `lost_at = now()`
                                    `status = 'won'`                `status = 'lost'`
```

---

## 2. Attention State Decoupling Invariant

* **Pipeline Stage (`pipeline_stages`):** Where the deal sits in the sales cycle (`New`, `Contacted`, `Qualified`, `Proposal`, `Won`, `Lost`).
* **Operational Status (`leads.status`):** Primary lifecycle state (`active`, `won`, `lost`, `archived`).
* **Urgency & Attention:** Dynamically calculated based on SLA thresholds (e.g. `HOT` uncontacted $> 2\text{h}$, proposal stale $> 5\text{d}$).
