# Domain Heuristics — /business-analyse-quick

> **Purpose:** Accelerate entity/property/section/rule inference for common business domains.
> This table is an **accelerator**, not a limiter. If the user's domain is not listed,
> the LLM infers entities, properties, sections, and rules from general knowledge.

---

## HR / Ressources Humaines

- **Employee** (FirstName:string, LastName:string, Email:string, HireDate:DateTime, DepartmentId:Guid→Department)
  labels: { fr: "Employé", en: "Employee", it: "Dipendente", de: "Mitarbeiter" }
- **Department** (Name:string, Code:string, ParentDepartmentId:Guid?→Department)
  labels: { fr: "Département", en: "Department", it: "Dipartimento", de: "Abteilung" }
- typicalSections: list, detail, orgchart (functional)
- typicalRules: "Employee must have unique email", "Department cannot be its own parent"
- personExtension: Employee
- typicalRoles: [{ role: "HR Admin", level: "admin" }, { role: "HR Manager", level: "manager" }, { role: "Employee", level: "viewer" }]

## Absences / Congés

- **Absence** (StartDate:DateTime, EndDate:DateTime, Type:string, Status:string, EmployeeId:Guid→Employee)
  labels: { fr: "Absence", en: "Absence", it: "Assenza", de: "Abwesenheit" }
- **AbsenceType** (Name:string, Code:string, MaxDays:int, IsPaid:bool)
  labels: { fr: "Type d'absence", en: "Absence Type", it: "Tipo di assenza", de: "Abwesenheitstyp" }
- typicalSections: list, detail, calendar (functional), approve (functional)
- typicalRules: "StartDate must be before EndDate", "Cannot exceed MaxDays per type per year", "Approval required for > 3 days"
- workflow: Draft → Submitted → Approved/Rejected
- typicalRoles: [{ role: "HR Admin", level: "admin" }, { role: "Manager", level: "manager" }, { role: "Employee", level: "contributor" }]

## CRM / Clients

- **Customer** (FirstName:string, LastName:string, Email:string, Phone:string, CompanyName:string?)
  labels: { fr: "Client", en: "Customer", it: "Cliente", de: "Kunde" }
- **Contact** (FirstName:string, LastName:string, Email:string, Phone:string, CustomerId:Guid→Customer)
  labels: { fr: "Contact", en: "Contact", it: "Contatto", de: "Kontakt" }
- typicalSections: list, detail, dashboard (embedded)
- typicalRules: "Customer must have unique email or phone", "Contact requires valid Customer"
- personExtension: Customer, Contact
- typicalRoles: [{ role: "CRM Admin", level: "admin" }, { role: "Sales Manager", level: "manager" }, { role: "Sales Rep", level: "contributor" }]

## Commandes / Orders

- **Order** (OrderDate:DateTime, TotalAmount:decimal, Status:string, CustomerId:Guid→Customer)
  labels: { fr: "Commande", en: "Order", it: "Ordine", de: "Bestellung" }
- **OrderLine** (Quantity:int, UnitPrice:decimal, TotalPrice:decimal, ProductId:Guid→Product, OrderId:Guid→Order)
  labels: { fr: "Ligne de commande", en: "Order Line", it: "Riga d'ordine", de: "Bestellposition" }
- typicalSections: list, detail, dashboard (embedded)
- typicalRules: "TotalPrice = Quantity * UnitPrice", "Order TotalAmount = sum of lines", "Cannot delete confirmed order"
- workflow: Draft → Confirmed → Shipped → Delivered/Cancelled
- typicalRoles: [{ role: "Sales Admin", level: "admin" }, { role: "Sales Manager", level: "manager" }, { role: "Sales Rep", level: "contributor" }]

## Facturation / Invoicing

- **Invoice** (InvoiceDate:DateTime, DueDate:DateTime, TotalAmount:decimal, Status:string, CustomerId:Guid→Customer)
  labels: { fr: "Facture", en: "Invoice", it: "Fattura", de: "Rechnung" }
- **InvoiceLine** (Description:string, Quantity:int, UnitPrice:decimal, TotalPrice:decimal, InvoiceId:Guid→Invoice)
  labels: { fr: "Ligne de facture", en: "Invoice Line", it: "Riga di fattura", de: "Rechnungsposition" }
- typicalSections: list, detail, dashboard (embedded)
- typicalRules: "DueDate must be after InvoiceDate", "TotalPrice = Quantity * UnitPrice", "Cannot modify paid invoice"
- workflow: Draft → Sent → Paid/Overdue/Cancelled
- typicalRoles: [{ role: "Finance Admin", level: "admin" }, { role: "Accountant", level: "contributor" }, { role: "Viewer", level: "viewer" }]

## Projets / Projects

- **Project** (Name:string, Code:string, StartDate:DateTime, EndDate:DateTime?, Status:string, ManagerId:Guid?→Employee)
  labels: { fr: "Projet", en: "Project", it: "Progetto", de: "Projekt" }
- **Task** (Title:string, Description:string?, DueDate:DateTime?, Status:string, Priority:string, ProjectId:Guid→Project, AssigneeId:Guid?→Employee)
  labels: { fr: "Tâche", en: "Task", it: "Attività", de: "Aufgabe" }
- **Milestone** (Name:string, DueDate:DateTime, Status:string, ProjectId:Guid→Project)
  labels: { fr: "Jalon", en: "Milestone", it: "Traguardo", de: "Meilenstein" }
- typicalSections: list, detail, board (functional), timeline (functional)
- typicalRules: "EndDate must be after StartDate", "Task DueDate cannot exceed project EndDate", "Milestone blocks project completion"
- workflow: Planning → InProgress → Completed/OnHold/Cancelled
- typicalRoles: [{ role: "Project Admin", level: "admin" }, { role: "Project Manager", level: "manager" }, { role: "Team Member", level: "contributor" }, { role: "Stakeholder", level: "viewer" }]

## Stock / Inventaire

- **Product** (Name:string, Code:string, Description:string?, UnitPrice:decimal, CategoryId:Guid?→Category)
  labels: { fr: "Produit", en: "Product", it: "Prodotto", de: "Produkt" }
- **Category** (Name:string, Code:string, ParentCategoryId:Guid?→Category)
  labels: { fr: "Catégorie", en: "Category", it: "Categoria", de: "Kategorie" }
- **StockMovement** (Quantity:int, Type:string, Date:DateTime, ProductId:Guid→Product, WarehouseId:Guid?→Warehouse)
  labels: { fr: "Mouvement de stock", en: "Stock Movement", it: "Movimento di stock", de: "Lagerbewegung" }
- typicalSections: list, detail, movements (functional), inventory (functional)
- typicalRules: "Product code must be unique", "Stock cannot go negative", "Category cannot be its own parent"
- typicalRoles: [{ role: "Inventory Admin", level: "admin" }, { role: "Warehouse Manager", level: "manager" }, { role: "Stock Clerk", level: "contributor" }]

## Contrats / Contracts

- **Contract** (Title:string, StartDate:DateTime, EndDate:DateTime?, Status:string, Amount:decimal?, CustomerId:Guid→Customer)
  labels: { fr: "Contrat", en: "Contract", it: "Contratto", de: "Vertrag" }
- **ContractAmendment** (Description:string, Date:DateTime, Amount:decimal?, ContractId:Guid→Contract)
  labels: { fr: "Avenant", en: "Amendment", it: "Emendamento", de: "Nachtrag" }
- typicalSections: list, detail, renewals (functional)
- typicalRules: "EndDate must be after StartDate", "Amendment Date must be within contract period", "Cannot amend terminated contract"
- workflow: Draft → Active → Expired/Terminated/Renewed
- typicalRoles: [{ role: "Contract Admin", level: "admin" }, { role: "Contract Manager", level: "manager" }, { role: "Viewer", level: "viewer" }]

## Tickets / Support

- **Ticket** (Title:string, Description:string, Priority:string, Status:string, Category:string, CustomerId:Guid?→Customer, AssigneeId:Guid?→Employee)
  labels: { fr: "Ticket", en: "Ticket", it: "Ticket", de: "Ticket" }
- **TicketComment** (Content:string, IsInternal:bool, TicketId:Guid→Ticket)
  labels: { fr: "Commentaire", en: "Comment", it: "Commento", de: "Kommentar" }
- typicalSections: list, detail, dashboard (embedded), board (functional)
- typicalRules: "Priority must be set before assignment", "Internal comments not visible to customer", "SLA timer based on priority"
- workflow: Open → InProgress → Resolved → Closed/Reopened
- typicalRoles: [{ role: "Support Admin", level: "admin" }, { role: "Support Agent", level: "contributor" }, { role: "Customer", level: "viewer" }]

## Fournisseurs / Suppliers

- **Supplier** (Name:string, Email:string, Phone:string, Address:string?, VatNumber:string?)
  labels: { fr: "Fournisseur", en: "Supplier", it: "Fornitore", de: "Lieferant" }
- **PurchaseOrder** (OrderDate:DateTime, Status:string, TotalAmount:decimal, SupplierId:Guid→Supplier)
  labels: { fr: "Bon de commande", en: "Purchase Order", it: "Ordine d'acquisto", de: "Bestellung" }
- typicalSections: list, detail
- typicalRules: "Supplier must have unique VatNumber", "PO requires valid supplier", "Cannot modify approved PO"
- workflow: Draft → Submitted → Approved → Received/Cancelled
- typicalRoles: [{ role: "Procurement Admin", level: "admin" }, { role: "Procurement Manager", level: "manager" }, { role: "Buyer", level: "contributor" }]

## Documents / GED

- **Document** (Title:string, FileName:string, FileSize:long, MimeType:string, FolderId:Guid?→Folder)
  labels: { fr: "Document", en: "Document", it: "Documento", de: "Dokument" }
- **Folder** (Name:string, ParentFolderId:Guid?→Folder)
  labels: { fr: "Dossier", en: "Folder", it: "Cartella", de: "Ordner" }
- typicalSections: list, detail, explorer (functional)
- typicalRules: "Folder cannot be its own parent", "File size limit per tenant", "Unique filename within folder"
- typicalRoles: [{ role: "Document Admin", level: "admin" }, { role: "Editor", level: "contributor" }, { role: "Reader", level: "viewer" }]

## Réservations / Bookings

- **Booking** (StartDate:DateTime, EndDate:DateTime, Status:string, ResourceId:Guid→Resource, ContactId:Guid?→Contact)
  labels: { fr: "Réservation", en: "Booking", it: "Prenotazione", de: "Buchung" }
- **Resource** (Name:string, Type:string, Capacity:int?, Location:string?)
  labels: { fr: "Ressource", en: "Resource", it: "Risorsa", de: "Ressource" }
- typicalSections: list, detail, calendar (functional)
- typicalRules: "EndDate must be after StartDate", "No overlapping bookings for same resource", "Cannot book past dates"
- workflow: Pending → Confirmed → Completed/Cancelled
- typicalRoles: [{ role: "Booking Admin", level: "admin" }, { role: "Booking Manager", level: "manager" }, { role: "Customer", level: "contributor" }]

## Événements / Events

- **Event** (Title:string, Description:string?, StartDate:DateTime, EndDate:DateTime, Location:string?, MaxAttendees:int?)
  labels: { fr: "Événement", en: "Event", it: "Evento", de: "Veranstaltung" }
- **Registration** (Status:string, RegisteredAt:DateTime, EventId:Guid→Event, ContactId:Guid?→Contact)
  labels: { fr: "Inscription", en: "Registration", it: "Iscrizione", de: "Anmeldung" }
- typicalSections: list, detail, registrations (functional)
- typicalRules: "Cannot exceed MaxAttendees", "Registration closes at event StartDate", "EndDate must be after StartDate"
- typicalRoles: [{ role: "Event Admin", level: "admin" }, { role: "Event Organizer", level: "manager" }, { role: "Attendee", level: "viewer" }]

## Formation / Training

- **Training** (Title:string, Description:string?, StartDate:DateTime, EndDate:DateTime, MaxParticipants:int?, TrainerId:Guid?→Employee)
  labels: { fr: "Formation", en: "Training", it: "Formazione", de: "Schulung" }
- **Enrollment** (Status:string, EnrolledAt:DateTime, TrainingId:Guid→Training, EmployeeId:Guid→Employee)
  labels: { fr: "Inscription", en: "Enrollment", it: "Iscrizione", de: "Anmeldung" }
- typicalSections: list, detail, enrollments (functional)
- typicalRules: "Cannot exceed MaxParticipants", "Employee cannot enroll twice in same training", "Trainer cannot be enrolled"
- typicalRoles: [{ role: "Training Admin", level: "admin" }, { role: "Trainer", level: "manager" }, { role: "Employee", level: "contributor" }]

## Maintenance / Equipment

- **Equipment** (Name:string, SerialNumber:string?, Status:string, Location:string?, CategoryId:Guid?→Category)
  labels: { fr: "Équipement", en: "Equipment", it: "Attrezzatura", de: "Ausrüstung" }
- **MaintenanceRequest** (Title:string, Description:string, Priority:string, Status:string, EquipmentId:Guid→Equipment, RequestedById:Guid?→Employee)
  labels: { fr: "Demande de maintenance", en: "Maintenance Request", it: "Richiesta di manutenzione", de: "Wartungsanfrage" }
- typicalSections: list, detail, schedule (functional)
- typicalRules: "Equipment must have unique SerialNumber", "Cannot request maintenance on decommissioned equipment"
- workflow: Submitted → Assigned → InProgress → Completed/Rejected
- typicalRoles: [{ role: "Maintenance Admin", level: "admin" }, { role: "Technician", level: "contributor" }, { role: "Requester", level: "viewer" }]
