feat(jour11+schema): Jour 11 photoUrl on TeamMember + audit doc updates
CognxSafeTrack+1: Claude Sonnet 4.6
61fd7f5
- TeamMember.photoUrl: new optional field stores the original WhatsApp image URL alongside the AI-extracted name/role/bio
- extractAndSaveTeamMember(): now persists photoUrl field
- Migration 20260513000003_add_team_member_photo_url
- Audit doc: mark Semaine 3-4 fully complete, add Stripe + Jour 11 items
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat(agentic-week2-4): 5 major features — AI content generator, handoff, tags, soft-delete, SSE
CognxSafeTrack+1: Claude Sonnet 4.6
99f6bca
## Agent Créateur de Contenu (Semaine 3)
- AIService.generateCurriculum() — structured GPT-4o prompt generates full Track + TrackDays
- POST /v1/organizations/:id/content/ai-generate — persists curriculum directly to DB
- TrackListPage: "Générer avec IA" button + modal (description, numDays, language, audience)
- Auto-redirects to the generated program days after creation
## Human Handoff Detection (Semaine 4)
- AIAgentHandler: detects 15 multilingual handoff keywords (FR/EN/ES)
- Sets Redis flag handoff:{userId}:{orgId} (24h) — pauses AI responses
- Emails org admin with contact info + link to admin UI
- Handles subsequent messages while in handoff mode gracefully
## Contact Segmentation by Tags (Semaine 2)
- Contact.tags String[] added to Prisma schema (migration + db:push applied)
- GET /contacts/tags — list all unique tags in org
- PATCH /contacts/:id/tags — set tags on a contact
- GET /contacts?tags=tag1,tag2 — filter contacts by tags (hasSome)
## SSE Real-time Updates (Semaine…
- AIAgentHandler: Redis sliding window (20 entries, TTL 24h) for conversation
history injected into system prompt — AI_AGENT now remembers context
- IndexingService.searchRelevantContext: cosine threshold 0.70 — returns '' if
no chunk is relevant so agent responds honestly instead of hallucinating
- add-hnsw-index.ts: one-shot HNSW index script (m=16, ef=64) for ~10x faster
pgvector cosine search on large knowledge bases
- scheduler.ts: hourly wallet alert (email via Brevo if < 3 days runway,
6h Redis suppression) + weekly report every Monday 07:00 UTC with trend vs
previous week and color-coded wallet status
- queue.ts + campaigns.ts: sendAt ISO-8601 parameter on broadcast/campaign
routes — BullMQ delay option schedules jobs natively, no cron needed
- docs/agentic/: roadmap updated with Semaine 1 marked complete
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>