Dealix Builder
e106a9a0d2
feat(targeting+service+excellence): Saudi Targeting OS + Service Tower + Service Excellence — 38 modules + 62 endpoints + 105 tests
...
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>
2026-05-01 17:11:00 +03:00
Dealix Builder
bcf545c22e
feat(self-improving): Hermes-inspired Agent Platform — 6 layers + 30 endpoints + 76 tests + Private Beta launch
...
Security Curator (4 modules) — جدار الحماية الأول
- secret_redactor: 11 patterns (GitHub PAT, OpenAI/Anthropic/Supabase/WhatsApp/Moyasar/Sentry/Google/AWS/private keys); never returns raw secret
- patch_firewall: blocks .env / credentials.json / RSA keys; scans added lines for secret patterns
- trace_redactor: masks phones (+966...) and emails for PII safety
- tool_output_sanitizer: cleans tool outputs before they hit ledger/Proof Pack/UI/observability
Growth Curator (5 modules) — التحسين الذاتي
- message_curator: grades Arabic messages (0..100), detects 8 risky phrases, suggests Saudi-tone skeleton
- playbook_curator: scores playbooks by outcome (accept/reply/meeting/deal); winner/promising/needs_work/archive
- mission_curator: scores completed missions; ship_it_widely/iterate/rework_or_retire
- skill_inventory: deterministic 23-skill catalog across 5 layers
- curator_report: weekly Arabic summary "ماذا تعلمنا هذا الأسبوع"
Meeting Intelligence (5 modules) — ذكاء الاجتماعات
- transcript_parser: accepts Google Meet entries OR plain "Speaker: text" format
- meeting_brief: 6-section pre-meeting brief in Arabic (objective/questions/objections/offer/next-step)
- objection_extractor: 8 categories (price/timing/authority/trust/integration/competitor/results/complexity)
- followup_builder: email + WhatsApp drafts; live_send_allowed=False always
- deal_risk: 0..100 score from objections + missing next-step + decision-maker absence + days-since-touch
Model Router (5 modules) — موجّه النماذج
- provider_registry: 7 providers (Claude Sonnet/Haiku, GPT-4-class, GPT-4o-mini, Gemini Pro, Azure OAI KSA-region, Local Qwen Arabic-tuned)
- task_router: 10 task types × routing decisions with reasons_ar
- cost_policy: bulk → low; output > 1500 tokens → high
- fallback_policy: high-sensitivity workloads prefer KSA-region/self-hosted FIRST
- usage_dashboard: deterministic demo of all task routes
Connector Catalog (3 modules) — كتالوج التكاملات
- 14 connectors (WhatsApp Cloud, Gmail, Calendar, Google Meet, Moyasar, LinkedIn Lead Forms, Google Business Profile, X API, Instagram, Sheets, CRM, Website Forms, Composio, MCP Gateway)
- Each has launch_phase (1-4), risk_level, allowed_actions, blocked_actions, Arabic risk dossier
- WhatsApp blocks cold_send_without_consent; Moyasar blocks store_card_number; MCP requires allowlist
Agent Observability (5 modules) — مراقبة الوكلاء + التقييمات
- trace_events: SHA256-hashes user/company IDs; sanitizes payload/output before logging
- safety_eval: 7 rules (guarantee, scarcity_fake, medical_claim, financial, regulatory, personal_data, urgency); 0..100 → safe/needs_review/blocked
- saudi_tone_eval: positive markers (هلا, لاحظت, يناسبك) vs negative (تحية طيبة وبعد, synergy, leverage); arabic_ratio bonus
- eval_pack: 5 curated cases with expected verdicts
- cost_tracker: per workflow/provider/task_type aggregation
Routers (6 new) — 30 endpoints
- /api/v1/security-curator/{demo, redact, inspect-diff, sanitize-output}
- /api/v1/growth-curator/{skills/inventory, messages/grade, messages/improve, messages/duplicates, missions/next, report/weekly, report/demo}
- /api/v1/meeting-intelligence/{brief, brief/demo, transcript/summarize, followup/draft, deal-risk}
- /api/v1/model-router/{providers, tasks, route, cost-class, usage/demo}
- /api/v1/connector-catalog/{catalog, summary, status, risks, {key}}
- /api/v1/agent-observability/{trace/build, safety/eval, tone/eval, evals/run}
Tests (6 new files, 76 tests)
- test_security_curator: 16 tests (PAT detect, key redact, env diff block, payload scan, trace mask)
- test_growth_curator: 16 tests (Arabic grade, risky phrases, dup detect, playbook scoring, mission recommend, weekly report)
- test_meeting_intelligence: 13 tests (transcript parse, brief sections, objection extract, followup drafts, deal risk)
- test_dealix_model_router: 11 tests (every task → ≥1 provider, KSA-region for high sensitivity, cost class, primary override)
- test_agent_observability: 12 tests (trace hashing, safety verdicts, tone scoring, eval pack)
- test_connector_catalog: 11 tests (≥12 connectors, every has risk/blocked actions, WA cold-send blocked, Moyasar card-storage blocked)
Docs (8 new + 1 updated)
- AGENT_SECURITY_CURATOR.md (Arabic)
- GROWTH_CURATOR_STRATEGY.md (Arabic)
- MEETING_INTELLIGENCE.md (Arabic)
- MODEL_PROVIDER_ROUTER.md (Arabic)
- CONNECTOR_CATALOG.md (Arabic)
- AGENT_OBSERVABILITY_EVALS.md (Arabic)
- PRIVATE_BETA_LAUNCH_TODAY.md (Arabic) — go-checklist + offer + risks
- DEMO_SCRIPT_12_MINUTES.md (Arabic) — minute-by-minute demo flow
- FIRST_20_OUTREACH_MESSAGES.md (Arabic) — 7 personas + 3 follow-ups, all under safety/tone evals
- DEALIX_100_PERCENT_LAUNCH_PLAN.md — added §34 Self-Improving Agent Platform + §35 Private Beta Launch
Landing
- landing/private-beta.html — Arabic RTL, dark theme, pricing, 11 demo endpoints, safety banner
Test results
- 76/76 new tests pass
- Full suite: 663 passed, 2 skipped (missing API keys, unrelated)
- 0 existing tests broken
Safety
- All 6 layers honor approval-first, draft-only, no-live-send
- Hash user/company IDs before any trace
- No secrets in logs/embeddings/traces (3-layer defense: redactor + sanitizer + firewall)
- Saudi tone eval rejects "تحية طيبة وبعد" + "synergy" auto-corporate language
- Safety eval blocks "ضمان 100%" + medical claims + fake urgency
- Connector Catalog: WhatsApp blocks cold-send, Moyasar blocks card storage, MCP requires allowlist
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 16:30:18 +03:00
Dealix Builder
4e969131c7
feat(platform+intelligence): Growth Control Tower + Growth Neural Network — 20 modules + 25 endpoints + 60 tests
...
Platform Services Layer (10 modules) — برج التحكم بالنمو
- event_bus: 27 typed events (whatsapp/email/calendar/lead/payment/review/social/partner/sheet/crm/action)
- identity_resolution: cross-channel merge (phone+email+CRM+social) with confidence scoring
- channel_registry: 11 channels (WA, Gmail, Calendar, Moyasar, LinkedIn, X, IG, GBP, Sheets, CRM, Forms) with capabilities/risk/PDPL notes
- action_policy: 9 rules (block_cold_whatsapp, block_payment_no_confirm, block_secrets, external_send_needs_approval, calendar_insert_needs_approval, social_dm_needs_explicit, unknown_source_review, high_value_deal_review, draft_only_safe)
- tool_gateway: single execution chokepoint, env-flag-gated live actions (default OFF)
- unified_inbox: 8 card types, ≤3 buttons enforced, Arabic
- action_ledger: requested→approved→executed audit trail
- proof_ledger: leads/meetings/drafts/sends/payments/revenue/risks_blocked/time_saved per channel
- service_catalog: 12 sellable services
- router api/routers/platform_services.py — 13 endpoints under /api/v1/platform/
Intelligence Layer (10 modules) — الشبكة العصبية للنمو
- growth_brain: per-customer Brain + is_ready_for_autopilot() (≥30 signals + ≥40% accept)
- command_feed: 9 daily card types (opportunity/revenue_leak/partner_suggestion/meeting_prep/review_response/competitive_move/customer_reactivation/ai_visibility_alert/action_required)
- action_graph: 10 typed edges (signal→action→outcome) with what_works_summary
- mission_engine: 7 missions, KILL FEATURE first_10_opportunities (10 فرص في 10 دقائق)
- decision_memory: learns from accept/skip/edit/block, returns preferences (channels, tones, sectors, rejected actions, accept_rate)
- trust_score: composite 0-100 (source+opt_in+channel+content+freq+approval) → safe/needs_review/blocked
- revenue_dna: best_channel/segment/angle + common_objection + avg_cycle_days
- opportunity_simulator: 9 Saudi sectors, expected_replies/meetings/deals/pipeline_sar + risk_score
- competitive_moves: 8 move types with Arabic recommended_action_ar
- board_brief: weekly Founder Shadow Board (3 decisions + 3 opportunities + 3 risks + relationship + experiment + metric)
- router api/routers/intelligence_layer.py — 12 endpoints under /api/v1/intelligence/
Tests
- tests/unit/test_platform_services.py — 31 tests covering catalog/channels/events/policy/gateway/identity/inbox/ledger/proof
- tests/unit/test_intelligence_layer.py — 29 tests covering brain/feed/graph/missions/memory/trust/dna/simulator/competitive/brief
- 60/60 new tests pass; full suite 587 passed, 2 skipped
Docs
- docs/PLATFORM_SERVICES_STRATEGY.md (Arabic)
- docs/INTELLIGENCE_LAYER_STRATEGY.md (Arabic)
- docs/DEALIX_100_PERCENT_LAUNCH_PLAN.md — added §32 Platform Services + §33 Intelligence Layer
Safety
- No live send by default (all WA/Gmail/Calendar/Moyasar guarded by env flags, all OFF)
- All external actions go through Tool Gateway → Action Policy → draft/approval_required
- No secrets allowed in payloads (block_secrets policy)
- PDPL-aware: cold WhatsApp without consent is hard-blocked
- Existing 477+ tests untouched (no breaking changes)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 16:05:12 +03:00
Dealix Builder
8942c6e84c
feat(growth-operator): Arabic Growth Operator — 10 modules + 16 endpoints + 50 tests
...
Builds the full Saudi Autonomous Revenue OS surface as 10 deterministic
modules + a 16-endpoint router under /api/v1/growth-operator/.
Approval-first: every outbound is draft. No live send / charge / calendar
insert from this layer.
MODULES (auto_client_acquisition/growth_operator/)
1. client_profile.py — ClientGrowthProfile + Saudi-default approval
+ compliance rules (no cold WhatsApp, blocked keywords, weekly cap,
quiet_hours_riyadh)
2. contact_importer.py — normalize_phone (Saudi E.164),
dedupe_contacts (richer-record-wins), classify_contact_source
(existing/inbound/event/referral/old_lead/cold/unknown), detect_opt_out
(Arabic + English markers), summarize_import (dashboard report)
3. contactability.py — score_contactability returns
safe/needs_review/blocked with Arabic reasons; default policy:
no cold WhatsApp without lawful basis (PDPL Art.5)
4. targeting.py — segment_contacts, rank_targets (filters unsafe),
recommend_top_10, why_now_stub (deterministic, sector-aware)
5. message_planner.py — draft_arabic_message (Saudi tone, 4-sector
opener bank, no overhyped phrases, always pending_approval),
draft_followup (4 outcome modes), draft_objection_response
(6 indexed Saudi B2B objections with score_delta + next_action)
6. partnership_planner.py — 6 partner types catalog
(agency / consultant / integrator / crm / community / influencer)
+ suggest_partner_types (size/sector aware) + draft_partner_outreach
+ partner_scorecard (platinum/gold/silver/bronze)
7. meeting_planner.py — build_meeting_agenda (15/20-30/45+ min slot
plans), build_calendar_draft (Google Calendar shape, live_inserted=False,
conferenceData for Meet, Asia/Riyadh timezone), build_post_meeting_followup
8. payment_offer.py — sar_to_halalas, build_moyasar_payment_link_draft
(full payload + in-chat message + 4-plan catalog, live_charged=False)
9. proof_pack.py — build_weekly_proof_pack with grade A+/A/B/C/D,
activity/money/quality/best-of sections, dynamic next_week_plan_ar,
markdown export
10. mission_planner.py — 6 GROWTH_MISSIONS (first_10_opportunities ⭐
kill feature, recover_stalled_deals, partnership_sprint,
safe_whatsapp_campaign, meeting_booking_sprint, list_cleanup);
list_missions() + run_mission()
ROUTER (api/routers/growth_operator.py) — 16 endpoints
POST /contacts/import-preview · POST /contactability/score
POST /targets/top-10 · POST /messages/draft · POST /messages/followup
POST /messages/objection-response · POST /partners/suggest
POST /partners/outreach · POST /partners/scorecard
POST /meetings/draft · POST /meetings/post-followup
POST /payment-offer/draft · GET /missions · POST /missions/{id}/run
GET /proof-pack/demo · POST /profile
WIRING: api/main.py adds growth_operator import + router include
(positioned after personal_operator, before public).
DOCS
- docs/ARABIC_GROWTH_OPERATOR_FULL_SPEC.md (NEW): 20-section vision +
customer-type table + upload flow + contactability rules +
WhatsApp/Gmail/Calendar/Moyasar drafts + 6 missions + 16-endpoint
catalog + competitive comparison + beta readiness checklist
TESTS — 50 passing on Python 3.10 venv
tests/unit/test_growth_operator.py covers:
- Phone normalization across 5 input formats including invalid
- Dedupe richer-record invariant
- Source classification (existing/inbound/event/cold/unknown)
- Opt-out detection (Arabic + English notes + status)
- Import summary aggregation
- Contactability: opt-out blocked, cold WhatsApp blocked,
unknown→needs_review, existing→safe, inbound→safe
- Bulk contactability summary
- Top-10 filtering (unsafe excluded), max-cap enforcement
- Segment buckets
- Arabic message: pending_approval invariant + Arabic content
+ no overhyped phrases (banned list)
- Followup approval invariant
- Objection response: known + unknown→diagnostic
- Partner suggestions size-aware (SMB→agency/consultant/community)
- Partner outreach approval invariant
- Partner unknown type returns error
- Partner scorecard tier ordering
- Meeting agenda + calendar draft (live_inserted=False) +
Asia/Riyadh timezone + post-followup pending
- Payment: halalas conversion (1 SAR=100), negative raises,
draft NEVER charges (live_charged=False), unknown plan→error
- Proof pack: grade range + structure + markdown export
- Missions: first_10_opportunities present + kill feature ID
+ run mission known/unknown
- Profile: demo specialized + partial not specialized
+ default compliance blocks 'ضمان 100' + no_cold_whatsapp_without_lawful_basis
VERIFICATION
- 527 unit tests pass (was 477; +50 growth_operator)
- 2 skipped (provider smoke needs API keys)
- AST green on all 13 new files
- Approval invariant holds across every drafting function
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 15:33:11 +03:00
Dealix Builder
80e1fc3533
feat(launch): legal pages + onboarding flow + error pages + master runbook
...
LAUNCH-CRITICAL FIX
The index.html nav linked to /privacy.html and /terms.html but neither
existed → 404s on every visit to those nav links. This was a hard launch
blocker for any commercial use of Dealix in Saudi.
NEW PAGES (8)
Legal & Compliance:
- landing/privacy.html — PDPL-aligned Arabic privacy policy with 13 sections
covering scope/data collected/lawful bases (Art. 5/6)/purposes/sharing/
international transfers/retention (3-tier)/security (Art. 19-20)/
data subject rights (Art. 4-9)/cookies/breach response/contact
- landing/terms.html — Saudi B2B terms of service with 15 sections
covering acceptance/service description/account/acceptable use/data
ownership/AI features/pricing+billing (4 tiers)/pay-per-result terms/
SLA per tier/IP/liability limits/termination/disputes (SCCA Riyadh)
Onboarding flow:
- landing/signup.html — 60-second signup with consent checkbox, plan
selector (5 plans incl. Pay-per-Result featured), POSTs to /api/v1/leads
- landing/welcome.html — 5-step onboarding checklist with progress bar
(subscribed → ICP → WhatsApp → Gmail → first Daily Run)
- landing/payment-success.html — post-Moyasar success page with txn details,
next-steps card, ZATCA invoice note, Customer Portal CTA
- landing/payment-cancelled.html — graceful failure page with common reasons
+ bank transfer alternative
Error pages:
- landing/404.html — branded not-found with quick-link nav back
- landing/500.html — server error with auto-generated reference ID for
support tracking + status page link
Sitemap & robots:
- landing/sitemap.xml — 27 URLs with proper changefreq + priority weights
- landing/robots.txt — allow legal pages, disallow internal pages
Master runbook:
- docs/LAUNCH_MASTER_RUNBOOK_AR.md — 10-step launch plan covering DNS,
Railway, env vars (full list), DB migrations, domain mapping, Moyasar,
WhatsApp WABA, email deliverability (SPF/DKIM/DMARC), observability,
beta day. Includes manual smoke-test bash recipes + KPIs for first 30
days + rollback plan.
VERIFICATION
- 33 landing HTML pages total (was 25)
- All 8 new pages: valid DOCTYPE + closing </html>, Arabic RTL, mobile-friendly
- pytest: 477 passed, 2 skipped (unchanged)
- index.html nav links no longer 404
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 15:06:41 +03:00
Dealix Builder
e34cc729aa
feat(dealix): py3.10/3.11 compat shim + 54 unit tests for business/innovation/ai
...
PROBLEM
The codebase used Python 3.11+ stdlib features (`from datetime import UTC`,
`from enum import StrEnum`) in 22 files, breaking local dev on Python 3.10
(Windows users) and any pytest run that imports the affected modules.
SOLUTION
1. New `core/_py_compat.py` providing UTC + StrEnum shims that:
- On 3.11+ re-export the stdlib names (zero overhead)
- On 3.10 fall back to `timezone.utc` and a (str, Enum) backport
2. All 22 affected files patched to import from the shim:
- core/utils.py, core/config/models.py
- api/routers/admin.py
- auto_client_acquisition/{ai/model_router, agents/{intake,icp_matcher},
v3/{memory,agents,compliance_os,market_radar},
personal_operator/{operator,memory,launch_report},
innovation/{proof_ledger_repo,command_feed_live}}.py
- autonomous_growth/agents/sector_intel.py
- dealix/{trust/{approval,tool_verification,policy},
observability/cost_tracker,
contracts/{evidence_pack,event_envelope,audit_log,decision},
classifications/__init__,
governance/approvals}.py
3. Three new test suites for previously-untested layers (54 tests):
- tests/unit/test_business_suite.py — gtm_plan, launch_metrics,
market_positioning, pricing_strategy, proof_pack, unit_economics,
verticals (28 tests covering plan recommendation, performance fee,
ROI math, account health grading, vertical playbook structure)
- tests/unit/test_innovation_suite.py — aeo_radar, command_feed,
deal_rooms, experiments, growth_missions, proof_ledger, ten_in_ten
(18 tests covering deterministic reproducibility, card type taxonomy,
pending-approval invariant, kill-mission visibility)
- tests/unit/test_ai_model_router.py — ModelTask + get_model_route +
estimate_model_cost_class + requires_guardrail (8 tests covering
enum integrity, route round-trip, guardrail bool contract)
VERIFICATION
- ast.parse green on all 22 patched files
- pytest tests/unit/ → 477 passed, 2 skipped (provider smoke needs API keys)
on Python 3.10.12 venv with project requirements installed
- No behavior change on 3.11+: the shim re-exports stdlib symbols
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 14:50:04 +03:00
Sami Assiri
16e8ba2383
docs(ops): Railway existing-project checklist and troubleshooting
...
Made-with: Cursor
2026-05-01 14:36:09 +03:00
Sami Assiri
832469956b
docs: note Dealix API CI green on GitHub
...
Made-with: Cursor
2026-05-01 14:08:59 +03:00
Sami Assiri
031c3a2f04
ci(dealix): install aiosqlite for pytest sqlite conftest on GitHub
...
Made-with: Cursor
2026-05-01 14:07:17 +03:00
Sami Assiri
58ee025b45
docs(ops): beta gates checklist, Railway bind, Actions env setup; dependabot dealix; SECURITY policy; verification log
...
Made-with: Cursor
2026-05-01 14:06:42 +03:00
Sami Assiri
f79c69ff25
ci(dealix): root GitHub workflows, ai-company track, full Dealix API tree
...
Made-with: Cursor
2026-05-01 14:03:52 +03:00
Sami Assiri
4cfe2ed502
feat(gtm): implement 30-day execution artifacts and KPI rhythm
...
Add week-by-week GTM execution documents for outreach, demo/proposal engine, first paid close, pilot evidence loop, and governance KPI rhythm.
Wire all new artifacts into go-live revenue docs, source-of-truth index, tracks mapping, and architecture brief constitution paths for operational continuity.
Made-with: Cursor
2026-04-17 14:25:03 +03:00
Sami Assiri
1ceeea9004
feat(tier1): finalize production activation and revenue execution pack
...
Complete Tier-1 closure follow-through by wiring docs governance gates, RC release readiness checks, source-of-truth enforcement, executive weekly contract surface, and go-live severity notes.
Add full go-live revenue execution documentation set (production activation, real production playbook, trust expansion, first 3 clients, live deployment, and automated revenue engine) and register all canonical paths.
Made-with: Cursor
2026-04-17 14:13:57 +03:00
Sami Assiri
b4531f0a4c
feat(tier1): docs-governance CI, evidence gate, closure artifacts, trust/execution docs
...
- Replace repo-preflight with docs-governance workflow and check_docs_links.py
- Class B bundle: require correlation_id for external_*; AuditMetadata trace fields
- Root-safe TIER1 §2; optional .githooks pre-push for main
- Add RELEASE_READINESS_MATRIX_AR, SOURCE_OF_TRUTH_INDEX, operational severity, external index
- ExecWeeklyGovernanceContract; expand trust-fabric, execution-fabric, ADR-0001, ws5, Saudi overlays
- Wire MASTER TOC, enterprise-readiness, completion-program, architecture_brief paths
Made-with: Cursor
2026-04-16 16:46:36 +03:00
Sami Assiri
33af10127d
feat(tier1): master closure checklist AR, CI preflight, Class B bundle API, trust and execution docs
...
Made-with: Cursor
2026-04-16 16:28:33 +03:00
Sami Assiri
fb6b34bcc0
docs(core-os): completion program index + decision plane contracts; link PR16 tier1 checklist; merge follow-up
...
Made-with: Cursor
2026-04-16 16:21:33 +03:00
Sami Assiri
b86cf729de
merge: resolve PR #16 conflicts (router + AGENTS + LAUNCH_CHECKLIST)
...
Made-with: Cursor
2026-04-16 16:20:20 +03:00
Claude
b938969a7e
chore(dealix): update architecture brief report after final validation
...
https://claude.ai/code/session_01W1rJthWDkasijTdXCfxVHs
2026-04-16 13:17:10 +00:00
Claude
e11253ab12
feat(dealix): Tier-1 closure program — 10 tracks complete
...
Track 1 — Truth Lock:
docs/current-vs-target-register.md: Full subsystem maturity register
(73 Production, 27 Partial, 2 Pilot, 32 Target, 6 Watch = 52.1% maturity)
Track 2 — Document Consistency:
docs/governance/document-consistency-audit.md: All 6 checks PASS
(no dangling refs, no overclaim, all paths root-safe, naming consistent)
Track 3 — Decision Plane:
backend/app/schemas/structured_outputs.py: 17 Pydantic schemas with Provenance
(LeadScoreCard, QualificationMemo, ProposalPack, PricingDecisionRecord,
PartnerDossier, EconomicsModel, ApprovalPacket, TargetProfile, DDPlan,
ValuationMemo, SynergyModel, ICMemo, BoardPackDraft, ExpansionPlan,
StopLossPolicy, PMIProgramPlan, ExecWeeklyPack)
Track 4 — Execution Plane:
docs/governance/workflow-inventory.md: 8 short + 8 medium + 6 long-lived
workflows classified. 3 Temporal candidates with compensation logic.
Track 5 — Trust Fabric:
docs/governance/trust-closure-plan.md: 5 live components + Watch adoption
criteria for OPA/OpenFGA/Vault/Keycloak
Track 6 — Data & Connectors:
docs/governance/connector-standard.md: Connector facade contract, semantic
metrics dictionary, radar additions (Airbyte, Unstructured, Great Expectations)
Track 7 — Operating Plane:
docs/governance/operating-plane-checklist.md: GitHub governance, CI/CD
enhancements, CODEOWNERS template, OIDC/attestation roadmap
Track 8 — Saudi/GCC:
docs/governance/saudi-enterprise-readiness.md: PDPL processing register,
data classification, NCA ECC readiness, OWASP LLM Top 10, NIST AI RMF
Track 9 — Executive Surfaces:
docs/governance/executive-surface-closure.md: Wiring plan with real data
queries for Executive Room, Approval Center, Compliance Dashboard
Track 10 — Market Dominance:
docs/governance/market-dominance-plan.md: 3-tier packaging (Core/Strategic/
Sovereign), ROI narrative, competitive wedge, capability moat map,
executive sales stories (CEO/CTO/CFO/CISO)
Master Checklist: docs/tier1-master-closure-checklist.md
50 items total — 25 Done (documentation), 25 Target (runtime/integration)
https://claude.ai/code/session_01W1rJthWDkasijTdXCfxVHs
2026-04-16 13:08:26 +00:00
Claude
a319feb6d7
feat(dealix): complete Tier-1 Sovereign Enterprise Growth OS
...
Governance layer (14 docs):
- MASTER_OPERATING_PROMPT.md — operating constitution (five planes, six tracks, policy classes)
- docs/ai-operating-model.md — five-plane architecture (Decision/Execution/Trust/Data/Operating)
- docs/dealix-six-tracks.md — six strategic tracks (Revenue/Intelligence/Compliance/Expansion/Operations/Trust)
- docs/governance/execution-fabric.md — OpenClaw execution plane deep dive
- docs/governance/trust-fabric.md — trust plane with contradiction engine + evidence packs
- docs/governance/saudi-compliance-and-ai-governance.md — PDPL/ZATCA/SDAIA/NCA live controls
- docs/governance/technology-radar-tier1.md — Core/Strong/Pilot/Watch/Hold classification
- docs/governance/partnership-os.md — alliance lifecycle management
- docs/governance/ma-os.md — M&A corporate development lifecycle
- docs/governance/expansion-os.md — geographic and vertical growth
- docs/governance/pmi-os.md — post-merger integration framework
- docs/governance/executive-board-os.md — executive decision surfaces
- docs/execution-matrix-90d-tier1.md — 90-day sprint execution plan
- docs/adr/0001-tier1-execution-policy-spikes.md — 8 architectural decisions
Backend (3 models, 6 services, 8 API routes):
- Contradiction Engine — detect/track system conflicts
- Evidence Pack System — tamper-evident audit proof with SHA256
- Saudi Compliance Matrix — live PDPL/ZATCA/SDAIA/NCA controls
- Executive Room — unified executive decision surface
- Connector Governance — integration health monitoring
- Model Routing Dashboard — LLM provider metrics
- Forecast Control Center — actual vs forecast across tracks
- Approval Center — enhanced approval queue with SLA
Frontend (9 components):
- Executive Room, Evidence Pack Viewer, Approval Center
- Connector Governance Board, Saudi Compliance Dashboard
- Actual vs Forecast Dashboard, Risk Heatmap
- Policy Violations Board, Partner Pipeline Board
Tooling:
- scripts/architecture_brief.py — preflight validation (40/40 checks pass)
- Updated CLAUDE.md and AGENTS.md with governance references
https://claude.ai/code/session_01W1rJthWDkasijTdXCfxVHs
2026-04-16 12:48:13 +00:00
Sami Assiri
5fb8519be6
docs(tier1): enterprise readiness checklist and wiring for governance spine
...
Made-with: Cursor
2026-04-16 08:18:43 +03:00
Sami Assiri
c3b4ca0cf3
docs(tier1): six tracks, operating plane, execution fabric, radar, Saudi register, ADR spikes
...
Made-with: Cursor
2026-04-16 08:07:07 +03:00
Sami Assiri
c6efca32b5
docs(governance): expand operating fabric index and governance library
...
Made-with: Cursor
2026-04-16 07:58:36 +03:00
Sami Assiri
3109fd37a6
docs(governance): wire Master Operating Prompt to AGENTS, Claude, docs, and Claude settings
...
Made-with: Cursor
2026-04-16 07:51:52 +03:00
Sami Assiri
72b84a3dce
fix(dealix): sync agent prompts and await self-improvement flow
...
Copy full prompt library into SaaS runtime path, add prospecting run_id for isolation tests, and fix async SelfImprovementFlow calls (API, startup worker, LangGraph node).
Made-with: Cursor
2026-04-16 07:45:58 +03:00
Sami Assiri
eadcd269f4
chore(docs): commit all remaining architectural documents and matrices
2026-04-16 07:42:15 +03:00
Sami Assiri
f9a4a2f794
docs(governance): implement Master Operating Prompt rules as Repo Governance
2026-04-16 07:39:52 +03:00
Sami Assiri
e7e96bdc1a
feat(deals): implement Decision Memo Engine, Partnership Scout and Strategic PMO
2026-04-16 07:26:20 +03:00
Sami Assiri
7f4a87206d
docs(architecture): compile Master Execution Blueprint for Dealix Sovereign Growth OS
2026-04-16 07:22:07 +03:00
Sami Assiri
379dcf941e
feat(core-os): implement Sprint 3-4 Control Plane (Memory Store, Provider Router, Verification Ledger)
2026-04-16 07:18:14 +03:00
Sami Assiri
954b2ff209
chore(repo-os): implement Phase 1 Repo Operating Layer (AGENTS.md, CLAUDE.md, .claude/settings.json)
2026-04-16 07:14:51 +03:00
Sami Assiri
707c47e677
docs: upgrade to Execution Matrix v2.0 - Sovereign OS (16 Agents, 10 Layers, Tool Verification, Policy-as-Code)
2026-04-16 07:13:11 +03:00
Sami Assiri
ea13b3753a
docs/ci: implement GitHub Delivery Pack governance templates (PR, Issues, ADR)
2026-04-16 07:08:44 +03:00
Sami Assiri
3ed3fb6cd4
docs: add comprehensive Execution Matrix for Dealix Autonomous OS
2026-04-16 06:58:16 +03:00
Sami Assiri
ebfab72fbd
feat: complete Sovereign Growth & M&A capability — add 7 Advanced Strategic Agents
...
- Added 7 new apex-level agents (Sovereign Intelligence, Alliance Structuring, Due Diligence, Valuation, Exec Negotiator, Strategic PMO, Post-Merger Integration)
- Updated RAW Event Taxonomy in router to fully support HitL escalations, C-Suite reporting, and sovereign dashboards
- Re-architected Executor to support all 37 agents (mappings, tokens up to 8000 for apex, action triggers)
- Health check endpoints updated to validate the 37-agent ecosystem
- All tests passing
System is now fully aligned with the Dealix Autonomous Revenue & Strategic Growth OS execution plan.
2026-04-16 06:57:38 +03:00
Sami Assiri
39c6334ff6
feat: expand to 30-agent Autonomous Enterprise OS — add 10 strategic agents for partnerships, M&A, contracts, BizDev, supply chain, customer success, dynamic pricing, marketing automation, finance, and competitive intelligence
...
- 10 new agent prompt files with full JSON schemas
- Router: 30+ new events covering partnerships, acquisitions, contracts, supply chain, customer health, pricing, campaigns, invoicing, competitor alerts
- Executor: full registration (filenames, temperature, tokens, escalation rules, action dispatch)
- Health check: updated to validate all 30 prompts
- Tests: updated and passing (7/7)
- README: rewritten for Enterprise OS vision
2026-04-16 06:49:21 +03:00
Sami Assiri
1036582ec0
fix(health): correctly resolve prompts dir path for agent health api
2026-04-15 21:47:37 +03:00
Sami Assiri
cd89b54b74
feat: finalize fully autonomous AI agents ecosystem with quality gate, memory, and analytics dashboard
2026-04-15 21:42:35 +03:00
Sami Assiri
d8bb836614
feat(dealix): ship revenue discovery launch hardening
...
Add revenue discovery APIs/services, launch verification gates, CI quality checks, and frontend E2E/docs updates to prepare the branch for production go-live.
Made-with: Cursor
2026-04-15 17:51:23 +03:00
Sami Assiri
07557c4be9
feat(dealix): GTM polish, CRM/AI APIs, launch verification hardening
...
- Add integrations CRM and AI routing APIs; Salesforce OAuth refresh; lead CRM metadata
- Marketer hub, settings CRM UI, OS views; premium landing and strategy_summary differentiators
- Docs: API-MAP, product guide, competitive matrix, launch simulation, AGENT-MAP LLM routing
- Sync script: strategy legal + competitive matrix to public; pytest DB isolation (.pytest_dealix.sqlite)
- Tests: CRM status and AI routing smoke; check_go_live_gate UTF-8 stdout on Windows
- Alembic migrations for strategic deal links and lead company/sector/city
Made-with: Cursor
2026-04-13 05:08:39 +03:00
Sami Assiri
c114ac34ae
docs(dealix): production readiness — go-live gate CLI, LAUNCH_CHECKLIST, internal token note
...
- Add scripts/check_go_live_gate.py for in-process go-live-gate summary
- LAUNCH_CHECKLIST: go-live-gate section, CORS/FRONTEND_URL/NEXT_PUBLIC details, internal token review
- internal_api: pointer to checklist section 6 for strict production review
Made-with: Cursor
2026-04-13 02:44:15 +03:00
Sami Assiri
a07829d485
chore(dealix): extend OpenAPI path scan for template URLs
...
- verify_frontend_openapi_paths: capture \\/api/v1/...\, strip queries, optional prefix match for {param} routes
- kill-port-3000.ps1: clearer messages when port is already free
Made-with: Cursor
2026-04-13 00:06:37 +03:00
Sami Assiri
67fcc35877
chore(dealix): launch checklist, E2E port helper, OpenAPI path scan
...
- Document verify-launch, py/py-3, E2E, and port 3000 troubleshooting
- Add scripts/kill-port-3000.ps1 for Playwright webServer conflicts
- Increase Playwright webServer timeout to 180s
- Extend verify_frontend_openapi_paths for template literals; empty allowlist
- Commit Next routes.d.ts reference in next-env.d.ts after build
Made-with: Cursor
2026-04-12 23:13:29 +03:00
Sami Assiri
fcdbc1f004
feat(dealix): FE/BE audit — agent-system prefix, OpenAPI path check, Swagger theme
...
- Move agent_system router to /api/v1/agent-system to avoid /agents conflicts
- Exempt demo UI API paths from internal token when DEALIX_INTERNAL_API_TOKEN is set
- Replace deprecated Query(regex=) with pattern= in intelligence
- GET / redirects to /api/docs; mount docs-assets + custom Swagger CSS
- Frontend: use getApiBaseUrl() for API URLs; fix intelligence dashboard base
- Add scripts/verify_frontend_openapi_paths.py; note in LAUNCH_CHECKLIST
Made-with: Cursor
2026-04-12 14:57:30 +03:00
Cursor Agent
69f5082e5e
chore(dealix): launch runbooks, staging env templates, SQLite init on startup, product journey test
...
Co-authored-by: VoXc2 <VoXc2@users.noreply.github.com>
2026-04-12 11:01:09 +00:00
Cursor Agent
8c3d91c070
fix(dealix): resolve Python deps, SQLAlchemy metadata, JWT, and frontend CI
...
- Align httpx, litellm, langchain, openai, mem0ai, crewai, numpy, requests, pydantic
- Rename SequenceEvent ORM attribute to event_metadata (DB column stays metadata)
- Use PyJWT instead of python-jose in security and auth service
- Mem0: MemoryConfig + graceful fallback when init fails (CI without keys)
- Frontend: I18nProvider in root layout, fix dashboard LeadScoreCard props, Section id,
kpi-card useRef, en.json nameAr parity, e2e assertion for premium landing
- README: troubleshooting for connection refused and local E2E Playwright install
Co-authored-by: VoXc2 <VoXc2@users.noreply.github.com>
2026-04-12 10:32:05 +00:00
Cursor Agent
1b2baf6bc8
Merge branch 'claude/complete-system-prompts-wqJCm' into cursor/dealix-end-to-end-fix-fea4
...
Co-authored-by: VoXc2 <VoXc2@users.noreply.github.com>
2026-04-12 10:21:49 +00:00
Claude
89bffbed40
feat: Merge VoXc2/dealix models — APIKey + AppSetting + deployment guide
...
Merged from VoXc2/dealix repository:
- api_key.py: APIKey model (hash, prefix, permissions, rate limit, expiry)
+ AppSetting model (key-value config with typed values)
- Both adapted to TenantModel (multi-tenant) + added Arabic fields
- Registered in models/__init__.py
This closes the "API key management" gap from the gap analysis.
Also includes production deployment guide with step-by-step instructions
for going from code to live product (~283 SAR/month operating cost).
https://claude.ai/code/session_01LsnvBa7HwF5hs99VZbgLGj
2026-04-12 04:08:08 +00:00
Claude
5012925912
docs: Production deployment guide — from code to live product
...
Step-by-step guide to deploy Dealix to production:
1. Server setup (DigitalOcean/Hetzner, 30 min)
2. Environment configuration (15 min)
3. DNS setup with Cloudflare (10 min)
4. Docker build + launch (5 min)
5. WhatsApp Business API connection (20 min)
6. Stripe payment integration (15 min)
7. Sentry monitoring (5 min)
8. First client test (end-to-end verification)
Monthly operating cost: ~283 SAR (covered by 1 client subscription)
https://claude.ai/code/session_01LsnvBa7HwF5hs99VZbgLGj
2026-04-12 03:48:48 +00:00
Claude
4f286b5ec4
fix: Align ALL systems with single plan pricing (1,499 SAR)
...
Frontend i18n: single plan "Dealix All-in-One" replacing 3 tiers
WhatsApp knowledge: updated pricing response + marketer commission FAQ
All consistent: frontend, backend, knowledge base, investor deck
https://claude.ai/code/session_01LsnvBa7HwF5hs99VZbgLGj
2026-04-12 03:38:52 +00:00