system-prompts-and-models-o.../salesflow-saas/backend/app
Claude c398bd31ce
feat(dealix): Full OS orchestrator — unified deal lifecycle automation
The missing brain that connects ALL existing services into one system:

1. full_os_orchestrator.py — Deal lifecycle state machine:
   12 stages: new_lead → qualifying → qualified → nurturing →
   meeting_booked → meeting_done → proposal_sent → negotiating →
   payment_requested → pilot_active → closed_won/lost/opted_out.

   Each stage has: auto-transitions based on intent, auto-actions
   (send_whatsapp, book_meeting, sync_crm, etc.), Arabic response
   templates, qualification questions.

2. full_os.py API — 4 endpoints:
   - POST /os/process — classify event + determine next stage + actions
   - POST /os/process-and-act — same + auto-execute (WhatsApp send
     via Ultramsg if safe, or create draft if human approval needed)
   - POST /os/bulk-process — batch event processing
   - GET /os/stages — list all stages with transitions

3. How it works:
   Inbound WhatsApp → /os/process-and-act →
   classify intent → transition stage →
   if auto_send_allowed: send WhatsApp response immediately
   if human_approval_required: create draft for Sami to review
   Always: log activity + suggest next actions

4. Safety:
   - Negotiation/payment/pilot stages = human_approval_required
   - Opt-out = immediate stop, no further contact
   - All sends via existing Ultramsg (rate limited, logged)
   - Draft queue for anything needing review

Connects to existing infrastructure:
- outreach_engine._send_via_ultramsg() for WhatsApp
- OutreachDraft model for draft queue
- Reply classifier for intent detection

https://claude.ai/code/session_01W1rJthWDkasijTdXCfxVHs
2026-04-25 18:04:12 +00:00
..
agents fix(dealix): resolve Python deps, SQLAlchemy metadata, JWT, and frontend CI 2026-04-12 10:32:05 +00:00
ai chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
api feat(dealix): Full OS orchestrator — unified deal lifecycle automation 2026-04-25 18:04:12 +00:00
core fix(db): prevent duplicate audit seed on repeated init_db() calls 2026-04-20 06:38:40 +00:00
flows chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
integrations Dealix OS Frontend implementation v1 2026-03-31 19:53:49 +03:00
intelligence fix(intelligence): contact_phone fix + Apollo/PDL enrichment + CSV export + stats endpoints 2026-04-22 05:30:14 +00:00
middleware feat(dealix): close ALL 4 Tier-1 runtime gaps (Programs E, F, G, K, J) 2026-04-17 10:12:04 +00:00
models feat(dealix): full automation outreach system — draft queue + pipeline + send 2026-04-25 17:33:30 +00:00
observability feat(dealix): close ALL 4 Tier-1 runtime gaps (Programs E, F, G, K, J) 2026-04-17 10:12:04 +00:00
openclaw feat(dealix): close ALL 4 Tier-1 runtime gaps (Programs E, F, G, K, J) 2026-04-17 10:12:04 +00:00
schemas feat(dealix): Tier-1 closure program — 10 tracks complete 2026-04-16 13:08:26 +00:00
services feat(dealix): Full OS orchestrator — unified deal lifecycle automation 2026-04-25 18:04:12 +00:00
utils feat(dealix): D0 launch hardening — DLQ, PostHog, circuit breaker, pricing, runbook 2026-04-23 10:32:53 +00:00
workers fix(dealix): resolve Python deps, SQLAlchemy metadata, JWT, and frontend CI 2026-04-12 10:32:05 +00:00
__init__.py Add SalesMatic AI Sales SaaS Platform - Complete Foundation 2026-03-28 03:06:53 +00:00
config.py feat(dealix): D0 launch hardening — DLQ, PostHog, circuit breaker, pricing, runbook 2026-04-23 10:32:53 +00:00
database_rls.py feat(dealix): close ALL 4 Tier-1 runtime gaps (Programs E, F, G, K, J) 2026-04-17 10:12:04 +00:00
database.py chore(dealix): launch runbooks, staging env templates, SQLite init on startup, product journey test 2026-04-12 11:01:09 +00:00
main.py fix(health): add root /health for Railway healthcheck 2026-04-23 17:13:44 +03:00
sqlite_patch.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00