mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-06-17 23:09:35 +00:00
Targeting & Acquisition OS (16 modules) — نظام الاستهداف الذكي - account_finder: account-first targeting; 12 buying signals; deterministic 10-25 accounts per (sector, city) - buyer_role_mapper: 14 buyer roles + sector-specific buying-committee maps + role-based Arabic angles - contact_source_policy: 12 sources (crm_customer→opt_out) with risk_score, channels-allowed, retention guidance, lawful_basis - contactability_matrix: 5 action modes (suggest_only/draft_only/approval_required/approved_execute/blocked); opt-out always blocked - linkedin_strategy: Lead Forms + Ads + manual ONLY; linkedin_do_not_do() locks scrape/auto-DM/auto-connect/extensions - email_strategy: drafts + unsubscribe footer + domain-pacing (fresh/warmed/trusted/damaged) + spam-trigger risk - whatsapp_strategy: opt-in only; rejects cold + risky phrases; opt-in template requires explicit purpose+company+unsubscribe - social_strategy: official APIs only; listening + drafts; no auto-publish - outreach_scheduler: day-by-day plans + daily limits + opt-out enforcement - reputation_guard: bounce/complaint/opt-out thresholds → healthy/watch/pause + recovery actions per channel - daily_autopilot: Arabic brief + 7 today actions + EOD report - acquisition_scorecard: pipeline + meetings + risks + productivity_score - self_growth_mode: 5 ICP focuses for Dealix; daily brief + monthly targets - free_diagnostic: Free Growth Diagnostic (3 ops + msg + risk + plan) → paid pilot recommendation - contract_drafts: Pilot/DPA/Referral/Agency/SOW outlines (legal_review_required, PDPL-aware) - service_offers: 7 targeting-tier offers + recommend by customer-type Service Tower (8 modules) — برج الخدمات الذاتية (12 productized services) - service_catalog: 12 services with target_customer/outcome/inputs/workflow/deliverables/pricing/risk/proof/upgrade - service_wizard: deterministic recommend (agency→partner; list→list_intelligence; founder→self_growth; CEO→exec_brief; budget≥2999→growth_os; default→first_10) - mission_templates: workflow steps with approval gates + linked growth missions - pricing_engine: SAR quotes scaled by company_size×urgency×channels_count + setup_fee + monthly_offer - deliverables: client report outline + proof pack template + operator checklist (no live actions) - service_scorecard: 0..100 score from drafts/replies/meetings/pipeline/CSAT - whatsapp_ceo_control: daily brief, approval cards (≤3 buttons), risk alerts, EOD reports - upgrade_paths: deterministic next-service recommendation + Arabic upsell messages Service Excellence OS (8 modules) — مصنع الخدمات الممتازة - feature_matrix: 12 must-have features per service + advanced/premium/future tiers - service_scoring: 10-dimension excellence score (clarity, speed_to_value, automation, compliance, proof, upsell, uniqueness, scalability, ops_daily, proof_data) → launch_ready/beta_only/needs_work - quality_review: 4 gates (proof / approval / pricing / channels) + status verdict; review_service_before_launch and review/all - competitor_gap: 7 competitor categories (CRM, WhatsApp tools, email assistants, LinkedIn tools, agencies, revenue intelligence, generic AI) + Dealix advantages + do-not-copy - proof_metrics: required metrics + ROI estimate (pipeline_x + closed_won_x) + Arabic summary - research_lab: monthly brief + feature hypotheses + top-3 experiments + monthly review - service_improvement_backlog: feedback→backlog conversion + impact/effort prioritization + weekly improvements - launch_package: landing outline + sales script + 12-min demo script + 5-day onboarding checklist Routers (3 new) — 62 endpoints - /api/v1/targeting/* — 20 endpoints (accounts, buying-committee, contacts, uploaded-list, outreach, daily-autopilot, self-growth, reputation, linkedin, drafts, free-diagnostic, services, contracts) - /api/v1/services/* — 20 endpoints (catalog, recommend, intake, start, workflow, deliverables, proof-pack, quote, setup-fee, monthly-offer, scorecard, upgrade-path, ceo daily-brief/approval-card/risk-alert/EOD) - /api/v1/service-excellence/* — 22 endpoints (feature-matrix, score, quality-review, review/all, proof-metrics, roi-estimate, gap-analysis, research-brief, hypotheses, experiments, monthly-review, backlog, weekly-improvements, launch-package, landing/sales/demo/onboarding) Tests (3 new files, 105 tests) - test_targeting_os: 47 tests (Arabic accounts, buying committees, opt-out blocked, cold WA blocked, LinkedIn no-scraping, email unsubscribe, WA risk, outreach plan, reputation guard, self-growth, contracts, scorecard) - test_service_tower: 38 tests (12+ services, all have pricing/proof/deliverables/approval, wizard recommendations, workflow includes approval, quote scales, CEO cards ≤3 buttons, no live send) - test_service_excellence: 33 tests (feature matrix, score returns status, ALL services pass quality gates, ROI x-multiples, 7 competitor categories, hypotheses+experiments, backlog conversion, launch package complete, demo=12min) Docs (3 new + 1 updated) - TARGETING_ACQUISITION_OS.md (Arabic) - SERVICE_TOWER_STRATEGY.md (Arabic) - SERVICE_EXCELLENCE_OS.md (Arabic) - DEALIX_100_PERCENT_LAUNCH_PLAN.md — added §36 Targeting OS + §37 Service Tower + §38 Service Excellence + §39 Landing Pages Landing pages (4 new, RTL Arabic) - services.html — 3 doors + 12 productized services - free-diagnostic.html — free growth diagnostic - first-10-opportunities.html — kill feature - agency-partner.html — agency partner program Test results - 105/105 new tests pass - Full suite: 768 passed, 2 skipped - 0 existing tests broken Safety + integration with previous layers - Targeting OS uses contactability_matrix → ALL contacts gated before any send - Service Tower's workflow includes approval gate; ALL services live_send_allowed=False - Service Excellence quality_review BLOCKS launch on missing proof/approval/pricing/unsafe channels - linkedin_do_not_do() encodes 8 explicit prohibitions (scraping/auto-DM/auto-connect/extensions) - whatsapp_do_not_do() blocks cold sends + group scraping - Contracts always: legal_review_required=True, not_legal_advice=True, PDPL sections present - Self-Growth Mode lets Dealix target its OWN ICP using the same approval-first pipeline Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
162 lines
6.0 KiB
Python
162 lines
6.0 KiB
Python
"""Targeting-tier service offers — quick lookup of buyable offers."""
|
||
|
||
from __future__ import annotations
|
||
|
||
from typing import Any
|
||
|
||
# Targeting-OS-related offers. The full Service Tower has more.
|
||
TARGETING_OFFERS: tuple[dict[str, Any], ...] = (
|
||
{
|
||
"id": "list_intelligence",
|
||
"name_ar": "تحليل قائمة (List Intelligence)",
|
||
"target_customer_ar": "شركة عندها قائمة أرقام/إيميلات/عملاء قدامى",
|
||
"outcome_ar": "أفضل 50 target من قائمتك + رسائل + خطة 7 أيام",
|
||
"price_min_sar": 499,
|
||
"price_max_sar": 1500,
|
||
},
|
||
{
|
||
"id": "first_10_opportunities_sprint",
|
||
"name_ar": "10 فرص في 10 دقائق",
|
||
"target_customer_ar": "شركة B2B تحتاج فرص مؤهلة بسرعة",
|
||
"outcome_ar": "10 فرص + رسائل + خطة متابعة + Proof Pack",
|
||
"price_min_sar": 499,
|
||
"price_max_sar": 1500,
|
||
},
|
||
{
|
||
"id": "self_growth_operator",
|
||
"name_ar": "مدير نمو شخصي (Self-Growth Operator)",
|
||
"target_customer_ar": "مؤسسون / مستشارون / وكالات صغيرة",
|
||
"outcome_ar": "Daily brief + drafts + متابعة + تقارير",
|
||
"price_min_sar": 999,
|
||
"price_max_sar": 999,
|
||
},
|
||
{
|
||
"id": "linkedin_lead_gen_setup",
|
||
"name_ar": "إعداد LinkedIn Lead Gen",
|
||
"target_customer_ar": "شركات B2B تحتاج decision makers",
|
||
"outcome_ar": "حملة Lead Gen Form + audiences + ربط CRM",
|
||
"price_min_sar": 2000,
|
||
"price_max_sar": 7500,
|
||
},
|
||
{
|
||
"id": "whatsapp_compliance_setup",
|
||
"name_ar": "إعداد امتثال واتساب",
|
||
"target_customer_ar": "شركات تستخدم واتساب بشكل عشوائي",
|
||
"outcome_ar": "تصنيف القوائم + opt-in templates + audit",
|
||
"price_min_sar": 1500,
|
||
"price_max_sar": 4000,
|
||
},
|
||
{
|
||
"id": "partner_sprint",
|
||
"name_ar": "سبرنت شراكات",
|
||
"target_customer_ar": "شركات تبغى نمو عبر الشركاء",
|
||
"outcome_ar": "20 شريك محتمل + رسائل + 5 اجتماعات",
|
||
"price_min_sar": 3000,
|
||
"price_max_sar": 7500,
|
||
},
|
||
{
|
||
"id": "free_growth_diagnostic",
|
||
"name_ar": "تشخيص نمو مجاني",
|
||
"target_customer_ar": "أي شركة B2B تريد عينة قبل الـPilot",
|
||
"outcome_ar": "3 فرص + رسالة + تقرير مخاطر + خطة Pilot",
|
||
"price_min_sar": 0,
|
||
"price_max_sar": 0,
|
||
},
|
||
)
|
||
|
||
|
||
def list_targeting_services() -> dict[str, Any]:
|
||
return {
|
||
"total": len(TARGETING_OFFERS),
|
||
"offers": [dict(o) for o in TARGETING_OFFERS],
|
||
}
|
||
|
||
|
||
def recommend_service_offer(
|
||
customer_type: str,
|
||
*,
|
||
goal: str = "fill_pipeline",
|
||
) -> dict[str, Any]:
|
||
"""Recommend the best-fit offer for a customer type + goal."""
|
||
ct = (customer_type or "").lower()
|
||
|
||
if "agency" in ct or "وكالة" in ct:
|
||
chosen = next(o for o in TARGETING_OFFERS if o["id"] == "partner_sprint")
|
||
elif "list" in ct or "قائمة" in ct:
|
||
chosen = next(o for o in TARGETING_OFFERS if o["id"] == "list_intelligence")
|
||
elif "founder" in ct or "مؤسس" in ct:
|
||
chosen = next(o for o in TARGETING_OFFERS if o["id"] == "self_growth_operator")
|
||
elif "saas" in ct or "b2b" in ct:
|
||
chosen = next(o for o in TARGETING_OFFERS if o["id"] == "first_10_opportunities_sprint")
|
||
elif "whatsapp" in ct or "واتساب" in ct:
|
||
chosen = next(o for o in TARGETING_OFFERS if o["id"] == "whatsapp_compliance_setup")
|
||
else:
|
||
chosen = next(o for o in TARGETING_OFFERS if o["id"] == "free_growth_diagnostic")
|
||
|
||
return {
|
||
"recommended_offer": dict(chosen),
|
||
"reasoning_ar": (
|
||
f"بناءً على نوع العميل ({customer_type}) والهدف ({goal})، "
|
||
f"الأنسب: {chosen['name_ar']}."
|
||
),
|
||
}
|
||
|
||
|
||
def build_offer_card(service: dict[str, Any] | str) -> dict[str, Any]:
|
||
"""Build an Arabic offer card (≤3 buttons) for the inbox/feed."""
|
||
if isinstance(service, str):
|
||
service = next((o for o in TARGETING_OFFERS if o["id"] == service),
|
||
{"id": service, "name_ar": service,
|
||
"outcome_ar": "", "price_min_sar": 0, "price_max_sar": 0})
|
||
price_label = (
|
||
"مجاني"
|
||
if service.get("price_min_sar") == 0
|
||
else f"{service.get('price_min_sar')}–{service.get('price_max_sar')} ريال"
|
||
)
|
||
return {
|
||
"type": "service_offer",
|
||
"service_id": service.get("id"),
|
||
"title_ar": service.get("name_ar", "خدمة"),
|
||
"summary_ar": service.get("outcome_ar", ""),
|
||
"price_ar": price_label,
|
||
"buttons_ar": ["ابدأ الآن", "اطلب عرض", "تخطي"],
|
||
"approval_required": True,
|
||
}
|
||
|
||
|
||
def estimate_service_price(
|
||
service_id: str,
|
||
*,
|
||
company_size: str = "small",
|
||
urgency: str = "normal",
|
||
channels_count: int = 1,
|
||
) -> dict[str, Any]:
|
||
"""Estimate a SAR price range for a service given inputs."""
|
||
base = next((o for o in TARGETING_OFFERS if o["id"] == service_id), None)
|
||
if base is None:
|
||
return {"error": f"unknown service: {service_id}"}
|
||
|
||
p_min = float(base["price_min_sar"])
|
||
p_max = float(base["price_max_sar"])
|
||
|
||
# Size multiplier
|
||
size_mult = {"micro": 0.8, "small": 1.0, "medium": 1.3, "large": 1.7}.get(
|
||
company_size, 1.0,
|
||
)
|
||
# Urgency multiplier
|
||
urgency_mult = {"normal": 1.0, "rush": 1.3, "asap": 1.5}.get(urgency, 1.0)
|
||
# Channel multiplier
|
||
ch_mult = 1.0 + max(0, channels_count - 1) * 0.15
|
||
|
||
return {
|
||
"service_id": service_id,
|
||
"estimated_min_sar": round(p_min * size_mult * urgency_mult * ch_mult),
|
||
"estimated_max_sar": round(p_max * size_mult * urgency_mult * ch_mult),
|
||
"currency": "SAR",
|
||
"factors": {
|
||
"company_size": company_size,
|
||
"urgency": urgency,
|
||
"channels_count": channels_count,
|
||
},
|
||
}
|