# Demo Scope — Lead Qualification Funnel

**Goal:** Prove the core flow works before full build. Get user's sign-off on UX + report quality + Claude tool-use pattern.

**Estimated build time:** 2–3 days.
**Parent plan:** [lead-qualification-funnel.md](./lead-qualification-funnel.md)

---

## 1. What the demo proves

1. Chip-based chat (no free typing) feels natural and fast on mobile.
2. Claude Opus + tool-use can drive a deterministic question tree end-to-end.
3. The generated report is sales-grade — sharp enough that a real lead would care.
4. The CRM branch math (loss / gap) produces believable numbers.

If these 4 land, full build is greenlit. If not, we iterate before writing more code.

---

## 2. In scope (demo only)

- One Next.js route: `/demo-report`.
- Phone field + **fake OTP** (any 6-digit input works; or hardcoded `123456`). No SMS sent.
- Carrier-lookup **simulated** (a checkbox in dev panel: "treat number as VOIP" to test the hr@fruxinfo.com fallback screen).
- **CRM branch only** — full 7-step question tree from Section 5.1 of the parent plan.
- Claude Opus tool-use loop for chat turns.
- Claude Sonnet for the final report generation.
- Inline HTML report with the signature footer.
- 5-line summary + Copy button + Share-on-WhatsApp button (real `wa.me` link).
- Chat language matches user (English + 1 test language, e.g. Hindi, to prove multilingual works).

## 3. Out of scope (skipped, to be added in full build)

- Real SMS / OTP delivery (fake only)
- Real carrier-lookup API (simulated)
- MySQL persistence (in-memory / localStorage only)
- Redis (in-memory rate-limit only)
- Other 5 service branches (Website, Marketing, Mobile, E-commerce, Other)
- Admin panel
- Restart / regen flow
- Login, sessions, security hardening
- GA4, Slack alerts, error monitoring
- Privacy policy / consent / data-deletion
- Production deploy — runs locally only

---

## 4. Build steps

| # | Step | Output |
|---|------|--------|
| 1 | Scaffold `/demo-report` route with the 3 screens: phone → OTP → chat+report | Routing skeleton |
| 2 | Build phone screen + fake-OTP screen + carrier-lookup simulation toggle | Stage 1–2 working |
| 3 | Define the CRM question tree as JSON config | One source of truth for the chat |
| 4 | Wire up Claude Opus API with tool definitions (`ask_question`, `collect_data_point`, `branch_to_service`, `ready_to_generate_report`) | Backend `/api/demo/chat-turn` |
| 5 | Build chip-based chat UI (selection-first, auto-advance, progress bar) | Frontend Stage 3 |
| 6 | Build `/api/demo/generate-report` using Sonnet + loss/gap math | Report HTML |
| 7 | Render report inline with signature footer + 5-line summary + Copy + WhatsApp buttons | Stage 4–5 |
| 8 | Add language switch test (English ↔ Hindi) to prove multilingual prompt works | Multilingual ok |
| 9 | Local end-to-end test on mobile viewport | Demo ready |

---

## 5. Demo acceptance checklist

Before showing the user, verify:

- [ ] Mobile viewport: full flow completes in under 2 minutes.
- [ ] Chips are tap-friendly (≥44px), auto-advance after select.
- [ ] Counter-question example triggers (e.g., conflicting answer → Claude clarifies with chips, not free text).
- [ ] Report numbers match the input data (manual sanity check).
- [ ] Report tone reads like a senior strategist, not a generic AI dump.
- [ ] 5-line summary copies to clipboard cleanly.
- [ ] WhatsApp share opens with summary text prefilled.
- [ ] Hindi run produces Hindi chips + Hindi report.
- [ ] VOIP-toggle test shows the hr@fruxinfo.com fallback screen.

---

## 6. After demo

- **If approved:** start Phase 1 of the parent plan (lock all 6 question trees, wireframe admin panel).
- **If rejected:** iterate on the specific failed acceptance items before any further build.

No production code, infra, or ad spend happens until the demo is signed off.
