system-prompts-and-models-o.../salesflow-saas/backend
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
..
alembic feat(dealix): close ALL 4 Tier-1 runtime gaps (Programs E, F, G, K, J) 2026-04-17 10:12:04 +00:00
app feat(dealix): Full OS orchestrator — unified deal lifecycle automation 2026-04-25 18:04:12 +00:00
knowledge_base 🚀 Complete Dealix AI Sales Empire Update - Security Scrubbed, Lead Engine & Multi-Channel Ready 2026-04-02 17:17:13 +03:00
scripts feat(dealix): k6 smoke test, SLO definition, fault-injection tests, env update 2026-04-23 10:46:57 +00:00
tests feat(dealix): follow-ups + outreach stats + 14 automation tests (40/40 pass) 2026-04-25 17:44:02 +00:00
.env.phase2.example chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
alembic.ini Add SalesMatic AI Sales SaaS Platform - Complete Foundation 2026-03-28 03:06:53 +00:00
campaign_results.json 🚀 Complete Dealix AI Sales Empire Update - Security Scrubbed, Lead Engine & Multi-Channel Ready 2026-04-02 17:17:13 +03:00
Dockerfile fix(docker): CPU-only torch + multi-stage build to fix Railway 4GB limit 2026-04-23 13:33:09 +00:00
main.py feat(intelligence): Revenue Intelligence OS — Lead Machine complete 2026-04-20 06:35:59 +00:00
pyproject.toml feat(dealix): execute ALL automatable blueprint tasks 2026-04-17 10:39:21 +00:00
pytest.ini fix(ci): restore pytest.ini to match passing commit + clean CI YAML 2026-04-17 05:54:32 +00:00
railway.toml fix(docker): CPU-only torch + multi-stage build to fix Railway 4GB limit 2026-04-23 13:33:09 +00:00
requirements-dev.txt fix(ci): pin pytest==8.3.4 + pytest-asyncio==0.24.0 exact versions 2026-04-17 05:02:44 +00:00
requirements.txt fix(ci): add import diagnostics + pin pytest-cov + verbose error output 2026-04-17 05:46:10 +00:00
seed_database.py 🚀 Complete Dealix AI Sales Empire Update - Security Scrubbed, Lead Engine & Multi-Channel Ready 2026-04-02 17:17:13 +03:00
update_requirements.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00