system-prompts-and-models-o.../dealix/auto_client_acquisition/launch_ops/demo_flow.py
Dealix Builder 84f1ad9620 feat(launch+revenue): Private Beta Launch Ops + Revenue Launch — 14 modules + 29 endpoints + 56 tests + scripts/landing/docs
Launch Ops (5 modules) — برج إطلاق الـ Private Beta
- private_beta: 499 SAR × 7-day offer + safety notes + 6-question Arabic FAQ
- demo_flow: 12-minute minute-by-minute Arabic demo + 5 discovery Qs + 6 objection responses + close script
- outreach_messages: 4 segments × 5 prospects = 20 + per-segment Arabic messages + 3-step follow-ups + 6 reply handlers
- go_no_go: 10-gate readiness + 3 critical gates (no_secrets/live_sends_disabled/staging_health) + verdict + next-actions
- launch_scorecard: 11 event types + daily/weekly aggregation + targets (20 outreach/5 replies/3 demos/1 pilot daily)

Revenue Launch (7 modules) — تحويل Dealix إلى دخل
- offer_builder: 4 offers (Private Beta, 499 Pilot, Growth OS Pilot 1.5-3K, Free Case Study) + segment-aware recommend
- pipeline_tracker: 8-stage deterministic pipeline + add/update/summarize + revenue tracking + win rate
- outreach_sequence: re-export single source of truth from launch_ops with revenue-tier wrappers
- demo_closer: re-export from launch_ops
- pilot_delivery: 12-field intake form + 5-phase 24h delivery plan + per-service templates (First 10 / List Intel / Free Diagnostic)
- proof_pack_template: 5-line Arabic client summary + ROI estimate (pipeline_x + closed_won_x) + next-step recommendation (upsell/iterate/extend)
- payment_manual_flow: Moyasar invoice step-by-step (halalas-correct) + Arabic payment-link message + confirmation checklist; NEVER charges via API

Service Tower extensions (2 modules)
- contract_templates: re-export targeting_os contracts + new SLA outline (legal_review_required, PDPL-aware)
- vertical_service_map: 6 verticals (B2B SaaS / agencies / training-consulting / real estate / healthcare-local / retail-ecommerce) with primary+supporting services + buyer roles + common pains + winning offer

Routers (2 new) — 29 endpoints
- /api/v1/launch/* — 11 endpoints (private-beta/offer, demo/flow, outreach/{first-20, message, followup}, go-no-go, readiness, scorecard/{event, daily, weekly, demo})
- /api/v1/revenue-launch/* — 18 endpoints (offers + offers/recommend, outreach/{first-20, followup}, demo-flow, pipeline/{schema, summarize}, pilot-delivery/{intake-form, 24h-plan, first-10, list-intelligence, free-diagnostic}, payment/{invoice-instructions, link-message, confirmation-checklist}, proof-pack/{template, client-summary, next-step})

Tests (2 new files, 56 tests)
- test_launch_ops.py: 25 tests (Private Beta offer essentials + Arabic FAQ; demo flow 12-min structure; first-20 segments × 5; outreach Arabic + drafts only; followup steps differ; reply handlers include unsubscribe; go/no-go critical gates block; scorecard aggregation + verdict)
- test_revenue_launch.py: 31 tests (offers correct prices, no_live_charge=True; segment-aware recommends; pipeline 8 stages + add/update/summarize + win rate; outreach v2 Arabic; intake fields; 24h plan 5 phases; invoice halalas correct; payment confirmation blocks premature delivery; proof pack 5 lines + 3 next-step paths)

Scripts (1 new)
- scripts/launch_readiness_check.py: runs 10 gates locally + optional --staging-url; pretty/JSON output; critical gates determine GO/NO-GO/FIX-THEN-GO verdict

Landing pages (2 new, RTL Arabic)
- list-intelligence.html — List Intelligence service detail (499–1,500 SAR)
- growth-os.html — Growth OS Monthly subscription page (2,999 SAR/month)

Docs (1 new + 1 updated)
- REVENUE_TODAY_PLAYBOOK.md (Arabic) — 12-section playbook: offers, segments, messages, demo, pipeline, 24h delivery, Moyasar manual flow, proof pack, daily targets, go/no-go, what-not-to-do, next-step
- DEALIX_100_PERCENT_LAUNCH_PLAN.md — added §40 Launch Ops + §41 Revenue Launch + §42 Service Tower extensions + §43 Scripts

Test results
- 56/56 new tests pass
- Full suite: 824 passed, 2 skipped (missing API keys, unrelated)
- 0 existing tests broken

Safety integration
- All offers: live_send_allowed=False, no_live_charge=True, approval_required=True
- 10-gate go/no-go BLOCKS launch if no_secrets/live_sends_disabled/staging_health fail
- Moyasar: invoice/payment-link manual only; NEVER calls live charge API
- Payment confirmation checklist blocks delivery before invoice paid status
- All outreach messages: drafts only, follow-ups capped at 3, opt-out honored immediately
- 6 verticals mapped to safe service stacks; LinkedIn always Lead Forms (never scraping)

Integration with previous layers
- Launch Ops uses platform_services tool_gateway, intelligence_layer command_feed, security_curator redaction
- Revenue Launch uses targeting_os contractability + service_tower offers + intelligence_layer simulator
- Pipeline tracker integrates with action_ledger for stage transitions
- Proof Pack template references intelligence_layer proof metrics + service_excellence ROI

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 17:28:08 +03:00

105 lines
4.5 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""Demo flow — 12-min Arabic demo + discovery + objection handling + close."""
from __future__ import annotations
from typing import Any
def build_12_min_demo_flow() -> dict[str, Any]:
"""The canonical 12-minute Arabic demo plan."""
return {
"duration_minutes": 12,
"minute_by_minute_ar": [
"02: الفكرة الكبرى — Dealix ليس CRM ولا أداة واتساب.",
"24: Daily Brief / Command Feed — 3 قرارات + 3 فرص + 3 مخاطر.",
"46: 10 فرص في 10 دقائق — مثال حي.",
"68: Trust Score + Simulator + Approval Card.",
"810: الأمان والتكاملات — security_curator + connector_catalog.",
"1012: العرض والـ CTA — Pilot 7 أيام / 499 ريال.",
],
"demo_endpoints": [
"/api/v1/personal-operator/daily-brief",
"/api/v1/intelligence/command-feed/demo",
"/api/v1/intelligence/missions",
"/api/v1/targeting/free-diagnostic",
"/api/v1/services/catalog",
"/api/v1/launch/private-beta/offer",
],
"do_not_do_in_demo_ar": [
"لا تكشف API keys على الشاشة.",
"لا تشغّل live WhatsApp أو Gmail send.",
"لا تعد بأرقام لم تُحقَّق.",
],
}
def build_discovery_questions() -> list[dict[str, str]]:
"""5 discovery questions to ask in the demo's first 4 minutes."""
return [
{"key": "challenge",
"q_ar": "وش أكبر تحدي نمو لديكم اليوم؟"},
{"key": "current_targeting",
"q_ar": "كيف تستهدفون اليوم؟ ما الذي يعمل؟ ما الذي لا يعمل؟"},
{"key": "time_drain",
"q_ar": "ما الذي يأخذ وقتاً يومياً ولا يثبت قيمة؟"},
{"key": "old_list",
"q_ar": "هل عندكم قائمة عملاء قدامى لم تتم متابعتهم؟"},
{"key": "approval_owner",
"q_ar": "من يوافق على الرسائل قبل الإرسال؟"},
]
def build_objection_responses() -> dict[str, str]:
"""Standard Arabic objection-handling responses."""
return {
"price": (
"نقدم Free Diagnostic أولاً — تشوفون عينة قبل الدفع. "
"Pilot 499 ريال أرخص من ساعة عمل في وكالة."
),
"timing": (
"Pilot 7 أيام لا يحتاج التزام طويل. "
"نسلّم خلال أسبوع، تقررون بعدها."
),
"trust": (
"Approval-first: لا نرسل أي شيء بدون موافقتكم. "
"Audit ledger يسجل كل فعل."
),
"complexity": (
"Pilot لا يحتاج تكاملات. "
"نستلم intake في 30 دقيقة ونسلم خلال 24 ساعة."
),
"data_privacy": (
"PDPL-aware من اليوم الأول. "
"DPA draft جاهز للتوقيع. "
"بياناتكم تُخزّن في Supabase KSA-region حسب الإمكان."
),
"results_uncertainty": (
"لا نضمن أرقاماً، نضمن طريقة تشغيل + Proof Pack مفصّل. "
"إذا ما اقتنعتم بعد 7 أيام، تأخذون Proof Pack مجاناً وتمشون."
),
}
def build_close_script() -> dict[str, Any]:
"""The closing script — used in minute 11-12 of the demo."""
return {
"close_sequence_ar": [
"هل الفكرة منطقية؟",
"هل عندك أسئلة محددة قبل ما نبدأ؟",
"أحدد لكم Pilot يبدأ يوم الأحد القادم — موافق؟",
"أرسل لكم intake form + invoice خلال ساعة من نهاية المكالمة.",
],
"close_template_ar": (
"تمام، نبدأ Pilot 7 أيام بـ499 ريال. "
"أرسل لك خلال ساعة:\n"
"1. نموذج intake.\n"
"2. Moyasar invoice.\n"
"3. تأكيد موعد الكيك-أوف.\n\n"
"بعد الدفع، Pilot يبدأ يوم الأحد."
),
"if_hesitant_ar": (
"إذا تحبون عينة قبل الالتزام، أرسل لكم Free Growth Diagnostic "
"خلال 24 ساعة — 3 فرص + رسالة + توصية، بدون التزام."
),
}