system-prompts-and-models-o.../dealix/auto_client_acquisition/revenue_launch/pilot_delivery.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

141 lines
5.9 KiB
Python

"""24-hour pilot delivery templates per service."""
from __future__ import annotations
from typing import Any
def build_client_intake_form() -> dict[str, Any]:
"""The single intake form sent to a customer after they pay."""
return {
"fields": [
{"key": "company_name", "label_ar": "اسم الشركة", "required": True},
{"key": "website", "label_ar": "رابط الموقع", "required": True},
{"key": "sector", "label_ar": "القطاع", "required": True},
{"key": "city", "label_ar": "المدينة", "required": True},
{"key": "primary_offer", "label_ar": "العرض الرئيسي", "required": True},
{"key": "ideal_customer", "label_ar": "العميل المثالي",
"required": True},
{"key": "avg_deal_value_sar", "label_ar": "متوسط قيمة الصفقة",
"required": False},
{"key": "has_contact_list", "label_ar": "هل عندكم قائمة عملاء؟",
"required": True, "type": "boolean"},
{"key": "channels_available", "label_ar": "القنوات المتاحة",
"required": True, "type": "multi"},
{"key": "whatsapp_opt_in_status",
"label_ar": "حالة opt-in واتساب", "required": False},
{"key": "approval_owner",
"label_ar": "من يوافق على الرسائل قبل الإرسال؟",
"required": True},
{"key": "exclusions",
"label_ar": "شركات أو أشخاص لا نتواصل معهم",
"required": False, "type": "list"},
],
"estimated_completion_minutes": 10,
"approval_required": True,
}
def build_24h_delivery_plan(service_id: str) -> dict[str, Any]:
"""Generic 24-hour delivery plan for any service."""
return {
"service_id": service_id,
"phases": [
{"phase": "T+0h", "label_ar": "كيك-أوف",
"actions_ar": ["مراجعة intake + تأكيد القناة الأساسية"]},
{"phase": "T+1h", "label_ar": "Diagnosis",
"actions_ar": [
"تشغيل targeting/contactability على القائمة أو القطاع",
"تحديد buying committee + why-now",
]},
{"phase": "T+6h", "label_ar": "Drafting",
"actions_ar": [
"صياغة 10 رسائل عربية",
"تشغيل safety + Saudi tone evals على كل رسالة",
]},
{"phase": "T+18h", "label_ar": "Approval Pack",
"actions_ar": [
"إرسال drafts للعميل في approval cards (≤3 أزرار لكل بطاقة)",
"تحديث Action Ledger",
]},
{"phase": "T+24h", "label_ar": "Proof Pack v1",
"actions_ar": [
"تسليم Proof Pack المختصر",
"حجز جلسة مراجعة 30 دقيقة في نهاية الأسبوع",
]},
],
"approval_required": True,
"live_send_allowed": False,
}
def build_first_10_opportunities_delivery(intake: dict[str, Any]) -> dict[str, Any]:
"""Service-specific delivery for First 10 Opportunities Sprint."""
return {
"service_id": "first_10_opportunities_sprint",
"intake_received": bool(intake),
"delivery_steps_ar": [
"تشغيل account_finder على (sector, city) + offer.",
"buyer_role_mapper لكل شركة → 1 DM + 2 influencers.",
"explain_why_now لكل شركة (Arabic).",
"draft_b2b_email و/أو draft_whatsapp_message حسب القناة.",
"safety_eval + saudi_tone_eval على كل رسالة قبل التسليم.",
"بناء follow-up sequence لـ7 أيام.",
"Proof Pack v1 (PDF + JSON).",
],
"deliverables": [
"10 opportunity cards",
"10 Arabic messages",
"follow-up plan",
"Proof Pack v1",
],
"approval_required": True,
}
def build_list_intelligence_delivery(intake: dict[str, Any]) -> dict[str, Any]:
"""Service-specific delivery for List Intelligence."""
return {
"service_id": "list_intelligence",
"intake_received": bool(intake),
"delivery_steps_ar": [
"تنظيف الـ CSV + dedupe.",
"classify_source لكل صف.",
"evaluate_contactability + allowed_channels لكل contact.",
"تقسيم القائمة: safe / needs_review / blocked.",
"اختيار أفضل 50 target.",
"كتابة رسائل عربية للقطاع المهيمن.",
"Risk report + retention recommendation.",
],
"deliverables": [
"Cleaned CSV",
"Top 50 targets",
"Arabic messages per segment",
"Risk report",
"Channel mix recommendation",
],
"approval_required": True,
}
def build_growth_diagnostic_delivery(intake: dict[str, Any]) -> dict[str, Any]:
"""Free 24-hour growth diagnostic delivery."""
return {
"service_id": "free_growth_diagnostic",
"intake_received": bool(intake),
"delivery_steps_ar": [
"تشغيل recommend_accounts(sector, city) → 3 فرص.",
"كتابة رسالة عربية واحدة جاهزة.",
"تقرير risk سريع (واتساب opt-in / domain reputation / channel mix).",
"توصية بالخدمة المدفوعة الأنسب (Pilot 499 / Growth OS Pilot).",
],
"deliverables": [
"3 opportunities",
"1 Arabic message",
"Risk note",
"Paid pilot recommendation",
],
"delivery_time": "خلال 24 ساعة عمل",
"approval_required": True,
}