system-prompts-and-models-o.../salesflow-saas/backend/app/api/v1
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
..
webhooks 🚀 Complete Dealix AI Sales Empire Update - Security Scrubbed, Lead Engine & Multi-Channel Ready 2026-04-02 17:17:13 +03:00
__init__.py Add SalesMatic AI Sales SaaS Platform - Complete Foundation 2026-03-28 03:06:53 +00:00
admin.py feat(dealix): follow-ups + outreach stats + 14 automation tests (40/40 pass) 2026-04-25 17:44:02 +00:00
affiliates.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
agent_system.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
agents.py 🚀 Complete Dealix AI Sales Empire Update - Security Scrubbed, Lead Engine & Multi-Channel Ready 2026-04-02 17:17:13 +03:00
ai_agents.py Migrate SalesMatic to Dealix + Add complete affiliate recruitment & AI sales system 2026-03-30 15:49:58 +00:00
analytics.py Dealix OS Frontend implementation v1 2026-03-31 19:53:49 +03:00
approval_center.py fix(dealix): fully lazy API imports to fix CI + add Revenue Activation system 2026-04-17 04:43:57 +00:00
auth.py Add SalesMatic AI Sales SaaS Platform - Complete Foundation 2026-03-28 03:06:53 +00:00
automation.py feat(dealix): full automation outreach system — draft queue + pipeline + send 2026-04-25 17:33:30 +00:00
autonomous_foundation.py Dealix: OpenClaw safe core, SLA phase 2.5, full-ops UI 2026-04-08 23:31:02 +03:00
calls.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
channels.py feat: Complete Omnichannel Intelligence — 7 AI brains for every channel 2026-04-12 03:21:53 +00:00
commissions.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
companies.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
complaints.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
compliance.py feat: Add conversation intelligence, message writer, sales agent, APIs, and templates 2026-04-11 07:43:11 +00:00
connector_governance.py fix(dealix): fully lazy API imports to fix CI + add Revenue Activation system 2026-04-17 04:43:57 +00:00
consents.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
contacts.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
contradiction.py fix(dealix): fully lazy API imports to fix CI + add Revenue Activation system 2026-04-17 04:43:57 +00:00
customer_onboarding.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
dashboard.py Add SalesMatic AI Sales SaaS Platform - Complete Foundation 2026-03-28 03:06:53 +00:00
deals.py feat(dealix): enforcement layer + weekly pack + auto evidence + sales pack 2026-04-17 06:15:59 +00:00
disputes.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
drafts.py feat(dealix): connect draft queue to real WhatsApp send via Ultramsg 2026-04-25 17:49:46 +00:00
evidence_packs.py fix(dealix): fully lazy API imports to fix CI + add Revenue Activation system 2026-04-17 04:43:57 +00:00
executive_room.py feat(dealix): enforcement layer + weekly pack + auto evidence + sales pack 2026-04-17 06:15:59 +00:00
followups.py feat(dealix): follow-ups + outreach stats + 14 automation tests (40/40 pass) 2026-04-25 17:44:02 +00:00
forecast_control.py fix(dealix): replace all placeholder services + wire frontend to APIs 2026-04-17 05:05:10 +00:00
full_os.py feat(dealix): Full OS orchestrator — unified deal lifecycle automation 2026-04-25 18:04:12 +00:00
golden_path.py feat(dealix): golden path service + correlation_id + stack recommendations 2026-04-17 05:59:32 +00:00
guarantees.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
health.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
hermes.py fix: Enhanced Hermes API, router registration, and observability service 2026-04-11 08:36:50 +00:00
inbox.py fix: Update inbox API and router registration 2026-04-11 07:44:20 +00:00
intelligence.py feat: Finalize all systems + add 20 production libraries 2026-04-11 07:56:24 +00:00
knowledge.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
lead_prospector.py 🚀 Complete Dealix AI Sales Empire Update - Security Scrubbed, Lead Engine & Multi-Channel Ready 2026-04-02 17:17:13 +03:00
leads.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
marketing_hub.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
master.py 🚀 Complete Dealix AI Sales Empire Update - Security Scrubbed, Lead Engine & Multi-Channel Ready 2026-04-02 17:17:13 +03:00
meetings.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
model_routing.py fix(dealix): replace all placeholder services + wire frontend to APIs 2026-04-17 05:05:10 +00:00
operations.py Dealix: OpenClaw safe core, SLA phase 2.5, full-ops UI 2026-04-08 23:31:02 +03:00
outreach_engine.py 🚀 Complete Dealix AI Sales Empire Update - Security Scrubbed, Lead Engine & Multi-Channel Ready 2026-04-02 17:17:13 +03:00
payouts.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
pipeline.py 🚀 Complete Dealix AI Sales Empire Update - Security Scrubbed, Lead Engine & Multi-Channel Ready 2026-04-02 17:17:13 +03:00
presentations.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
pricing.py feat(dealix): D0 launch hardening — DLQ, PostHog, circuit breaker, pricing, runbook 2026-04-23 10:32:53 +00:00
proposals.py fix: Finalize proposals API, sales agent, and quote engine 2026-04-11 07:46:37 +00:00
prospecting.py 🚀 Complete Dealix AI Sales Empire Update - Security Scrubbed, Lead Engine & Multi-Channel Ready 2026-04-02 17:17:13 +03:00
revenue_room.py 🚀 Complete Dealix AI Sales Empire Update - Security Scrubbed, Lead Engine & Multi-Channel Ready 2026-04-02 17:17:13 +03:00
router.py feat(dealix): Full OS orchestrator — unified deal lifecycle automation 2026-04-25 18:04:12 +00:00
sales_os.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
saudi_compliance.py fix(dealix): fully lazy API imports to fix CI + add Revenue Activation system 2026-04-17 04:43:57 +00:00
saudi_workflow.py feat(dealix): wire ALL 17 schemas + Saudi workflow + release gate 2026-04-17 06:27:15 +00:00
sectors.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
sequences.py feat: Add conversation intelligence, message writer, sales agent, APIs, and templates 2026-04-11 07:43:11 +00:00
strategic_deals.py feat: Add Strategic Deals Engine — autonomous B2B deal-making system 2026-04-11 09:15:29 +00:00
strategy_summary.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
structured_outputs.py feat(dealix): wire ALL 17 schemas + Saudi workflow + release gate 2026-04-17 06:27:15 +00:00
supervisor.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
tenants.py Add SalesMatic AI Sales SaaS Platform - Complete Foundation 2026-03-28 03:06:53 +00:00
users.py Add SalesMatic AI Sales SaaS Platform - Complete Foundation 2026-03-28 03:06:53 +00:00
value_proposition.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
webhooks.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
whatsapp_webhook.py feat: Add WhatsApp AI Brain — central intelligence for Dealix number 2026-04-12 02:40:28 +00:00