|
| 1 | +# 7ya.io Workflow Product Module |
| 2 | + |
| 3 | +מודול זה ממפה SOP-ים חוזרים ומריץ אותם כסוכני Workflow שניתנים למכירה כרישוי מוצר. |
| 4 | + |
| 5 | +## SOP Mapping (Recurring Processes) |
| 6 | + |
| 7 | +### 1) Lead Qualification |
| 8 | +- **Inputs:** `lead_id`, `budget_usd`, `decision_authority`, `need_score`, `timeline_days` |
| 9 | +- **Rules:** ניקוד דטרמיניסטי לפי תקציב, סמכות קבלת החלטה, רמת צורך, ודחיפות זמן. |
| 10 | +- **Decisions:** `sales-qualified` / `marketing-qualified` / `unqualified` |
| 11 | +- **Outputs:** `qualification`, `next_action`, `score`, `reasoning` |
| 12 | + |
| 13 | +### 2) Content Repurposing |
| 14 | +- **Inputs:** `asset_id`, `source_type`, `source_word_count`, `target_channel` |
| 15 | +- **Rules:** פורמטים נגזרים לפי סוג מקור, הרחבה לתוכן ארוך, וטון לפי ערוץ. |
| 16 | +- **Decisions:** בחירת חבילת פורמטים, טון, וסטטוס. |
| 17 | +- **Outputs:** `output_formats`, `recommended_tone`, `workflow_status` |
| 18 | + |
| 19 | +### 3) Client Onboarding |
| 20 | +- **Inputs:** `signed_contract`, `package_type`, `primary_goal`, `stack` |
| 21 | +- **Rules:** חייב חוזה חתום; checklist לפי חבילה. |
| 22 | +- **Decisions:** אישור kickoff / השלמת נתונים / ניתוב discovery טכני. |
| 23 | +- **Outputs:** `onboarding_status`, `kickoff_tasks`, `owner_assignment` |
| 24 | + |
| 25 | +### 4) Campaign Reporting |
| 26 | +- **Inputs:** `channel_metrics`, `period_start`, `period_end`, `targets` |
| 27 | +- **Rules:** חישוב variance מול יעדים + חריגות מעל 15%. |
| 28 | +- **Decisions:** Healthy / Needs optimization / Escalate. |
| 29 | +- **Outputs:** `summary`, `flags`, `recommended_actions` |
| 30 | + |
| 31 | +## Implemented Workflow Agents |
| 32 | + |
| 33 | +1. **Lead Qualification Agent** |
| 34 | +2. **Content Repurposing Agent** |
| 35 | + |
| 36 | +מימושים נמצאים ב-`src/workflow_product_module.py` כולל לוגיקה, לוגים ו-KPI. |
| 37 | + |
| 38 | +## Logs + KPI Metrics |
| 39 | + |
| 40 | +כל ריצת Agent נשמרת כ-`TaskLog` עם: |
| 41 | +- `decision_accuracy` |
| 42 | +- `duration_ms` |
| 43 | +- `cost_usd` |
| 44 | + |
| 45 | +המודול מחשב אגרגציות: |
| 46 | +- `avg_decision_accuracy` |
| 47 | +- `avg_duration_ms` |
| 48 | +- `avg_cost_usd` |
| 49 | +- `total_tasks` |
| 50 | + |
| 51 | +## Product Packaging (API + Dashboard) |
| 52 | + |
| 53 | +המודול נארז כשרת HTTP בסיסי: |
| 54 | +- `GET /api/sops` |
| 55 | +- `POST /api/run/lead-qualification` |
| 56 | +- `POST /api/run/content-repurposing` |
| 57 | +- `GET /api/metrics` |
| 58 | +- `GET /dashboard` |
| 59 | + |
| 60 | +להרצה: |
| 61 | + |
| 62 | +```bash |
| 63 | +python -m src.workflow_product_module |
| 64 | +``` |
| 65 | + |
| 66 | +כך ניתן לספק רישוי כמוצר מודולרי ולא רק שירות ידני. |
0 commit comments