Spec: HR-29-flsa-classification-compliance-engine.md Status: 📝 Planned Last Updated: 2026-03-25Documentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
Integration Overview
HR-29 integrates within the HR core and with Platform Foundation layers:| Integration | Pattern | Direction | Status |
|---|---|---|---|
| HR-01 (Employee Directory) | Direct dependency (same core) | HR-29 reads position data; writes classification status | 📝 Planned |
| HR-07 (Payroll) | Event-based | HR-29 publishes classification change events | 📝 Planned |
| HR-07-ENHANCEMENTS EN-1 | Direct dependency (same core) | HR-29 creates retroactive pay requests | 📝 Planned |
| HR-05 (Time & Attendance) | Direct data read (same core) | HR-07 EN-1 reads hours for retroactive calc | 📝 Planned |
| PF-10 (Notifications) | Platform Integration Layer | HR-29 sends threshold and review alerts | 📝 Planned |
| PF-30 (RBAC) | Direct dependency | Permission checks for all operations | 📝 Planned |
Event Contracts
Published Events
hr.flsa.classification_changed
- Publisher: HR-29
- Subscribers: HR-07 (Payroll), HR-01 (Employee Directory)
- Trigger: When a classification is created, updated, or a reclassification is approved
- Payload Schema:
- Consumer Action (HR-07): Update overtime eligibility for affected employee in next payroll cycle; when
retroactive_pay_request_idis present, HR-07 EN-1 uses it to locate/compute retroactive pay and maintain the audit trail. - Consumer Action (HR-01): Update authoritative exempt/non-exempt fields on position and employee records per HR-01 data model (e.g.
exempt_status/is_exempt— use actual column names fromtypes.tsafter migration; HR-29 must not invent parallel payroll-facing fields)
hr.flsa.reclassification_approved
- Publisher: HR-29
- Subscribers: HR-07 (Payroll)
- Trigger: When a reclassification is approved
- Payload Schema:
- Consumer Action (HR-07): If
retroactive_pay_request_idis present, HR-07 EN-1 locates the request inhr_retroactive_pay_requestsand computes the retroactive amounts. HR-29 does not include pay amounts in this event.
Internal Application Logic (No Consumed Events)
Threshold change re-evaluation is handled as application-layer logic within HR-29, not as an event contract:- Immediate re-evaluation: When an admin saves a threshold with
effective_date ≤ today, the save handler triggers re-evaluation inline. - Scheduled re-evaluation: A daily cron job (
hr-flsa-threshold-check, 6:00 AM) checks for future-dated thresholds whose effective date has arrived and triggers batch re-evaluation.
Platform Integration Layer Usage
- PF-10 (Notifications):
@/platform/notifications— threshold proximity alerts, review due notifications, reclassification approval notifications - PF-30 (RBAC):
@/platform/permissions—useHasPermissionfor all FLSA permission keys
Data Flow: Reclassification with Retroactive Pay
Security Considerations
- All event payloads include
organization_idfor tenant validation - Subscribers MUST verify
organization_idmatches their tenant context - Classification data includes PII (salary); events carry only IDs and classification status, not salary amounts