mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-06-17 23:09:35 +00:00
1. GTM API Routes: 12 endpoints at /api/v1/gtm/* - company-intelligence, score-target, outreach-pack - compliance-check, classify-reply, next-action - daily-command-pack, targets, approvals - approve-action, log-outcome All registered in router.py 2. Governance Module: 4 files - approval_queue.py: add/approve/reject/get_pending - action_policy.py: policy per action type - audit_log.py: log every proposed action - risk_flags.py: HIGH/LOW risk classification 3. Proof Module: 3 files - evidence.py: VERIFIED/INFERRED/UNVERIFIED/LOW_CONFIDENCE - claim_validator.py: blocks fake claims - source_quality.py: rates source reliability 4. Customer Delivery: 2 files - customer_workspace.py: Pydantic model with onboarding checklist - customer_delivery_pipeline.py: create workspace + weekly report 5. All verified: 9/9 new imports pass, 30/30 evals, dry-run works https://claude.ai/code/session_01W1rJthWDkasijTdXCfxVHs
31 lines
1.3 KiB
Python
31 lines
1.3 KiB
Python
"""Customer Delivery Pipeline — creates workspace and manages onboarding."""
|
|
from dealix_gtm_os.models.customer_workspace import CustomerWorkspace
|
|
|
|
def create_workspace(company_name: str, sector: str, plan: str = "pilot", whatsapp: str = "", email: str = "", questions: list[str] = None) -> dict:
|
|
ws = CustomerWorkspace(
|
|
company_name=company_name,
|
|
sector=sector,
|
|
plan=plan,
|
|
lead_sources=[s for s in [whatsapp, email] if s],
|
|
qualification_questions=questions or [],
|
|
channels=["whatsapp" if whatsapp else "email"],
|
|
)
|
|
return ws.model_dump()
|
|
|
|
def get_onboarding_status(workspace: dict) -> dict:
|
|
checklist = workspace.get("onboarding_checklist", [])
|
|
done = sum(1 for t in checklist if t.get("done"))
|
|
return {"total": len(checklist), "done": done, "remaining": len(checklist) - done, "complete": done == len(checklist)}
|
|
|
|
def generate_weekly_report(workspace: dict) -> dict:
|
|
return {
|
|
"company": workspace.get("company_name"),
|
|
"plan": workspace.get("plan"),
|
|
"channels_active": workspace.get("channels", []),
|
|
"recommendations": [
|
|
"راجع سرعة الرد — هل تحت 45 ثانية؟",
|
|
"شيك الردود وصنّفها",
|
|
"تابع الاستفسارات اللي ما انحلت",
|
|
],
|
|
}
|