Version: 1.0.0Documentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
Last Updated: 2026-03-24
Spec: HR-14 Employee Relations
Enhancements catalog: HR-14-ENHANCEMENTS (EN-1 accommodations documented below)
Constitution Reference: Section 1.2 (Core Independence), Section 1.3 (Integration Patterns)
Overview
HR-14 manages employee relations incidents, investigations, and disciplinary actions. It publishes events for disciplinary terminations and incident reports, and integrates with HR-03 (Offboarding) and GR-06 (Incident Management).Integration Points
Platform Foundation (PF) Dependencies
Required PF Features:- PF-10 (Notifications): Incident notifications, investigation assignments
- Integration Type: Platform Integration Layer
- Usage: Notify HR admins of new incidents, notify employees of case updates
- PF-11 (Documents): Investigation documents, disciplinary action documentation
- Integration Type: Platform Integration Layer
- Usage: Attach investigation evidence, disciplinary action acknowledgment forms
Consumer Core Dependencies (Downstream)
Internal HR Features:- HR-01 (Employee Directory): Employee context
- HR-03 (Offboarding): Termination workflow integration
- GR-03 (Compliance): Compliance reporting
- GR-06 (Incident Management): Cross-module incident tracking
ADA reasonable accommodations (HR-14-ENHANCEMENTS / EN-1)
Spec: HR-14-ENHANCEMENTS — EN-1Status: Planned (implementation pending) Purpose: Structured ADA interactive process, accommodation implementation tracking, periodic reviews, and compliance reporting — with PHI-grade handling of medical documentation. Data:
hr_accommodation_requests, hr_accommodation_interactions, hr_accommodation_implementations (all organization_id-scoped; heightened RLS per spec).
Platform Integration Layer (required):
- HR-01: Employee profile, canonical manager/reporting relationship for manager-visible implementation rows and notification routing.
- HR-04: Schedule modification accommodations may reference or trigger scheduling adjustments through the platform layer.
- PF-10 / platform notifications: Request assignment, interactive-process reminders, review due dates, manager notifications (accommodation details only — no disability category or medical content).
- PF / Supabase Storage: Private org-scoped bucket or paths for medical attachments; storage policies mirror application RLS; managers must not have read access to medical objects.
employee_relations_case_id may be added later.
Permission keys (PF-30): hr.accommodations.view, hr.accommodations.manage, hr.accommodations.implementation.view — see spec Permission keys table.
Event Contracts
Event: hr_disciplinary_action_termination
Publisher: HR (HR-14)Subscribers: HR-03 (Offboarding), GR-06 (Incident Management)
Status: 📝 Planned Purpose: Trigger offboarding workflow and compliance tracking when disciplinary action results in termination Publish Trigger: When
hr_disciplinary_actions.action_type = 'termination' and status = 'active' is set
Payload Schema:
- HR-03 (Offboarding): Subscribes to trigger offboarding workflow; expects ACK within 1 hour
- GR-06 (Incident Management): Subscribes for compliance tracking; expects ACK within 24 hours
- Timeout: 30 minutes for HR-03, 24 hours for GR-06
- Retry: 3 attempts with exponential backoff
- DLQ: Failed events after retries moved to dead letter queue for manual review
- Required ACK window: HR-03 must ACK within 1 hour, GR-06 within 24 hours
Event: hr_incident_reported
Publisher: HR (HR-14)Subscribers: GR-06 (Incident Management)
Status: 📝 Planned Purpose: Cross-module incident tracking for compliance and safety Publish Trigger: When new
hr_incidents record is created via INSERT trigger or API
Payload Schema:
- GR-06 (Incident Management): Subscribes for cross-module incident tracking; expects ACK within 4 hours for critical incidents, 24 hours for others
- Timeout: 4 hours for critical incidents, 24 hours for others
- Retry: 5 attempts for critical incidents, 3 for others
- DLQ: Failed events after retries moved to dead letter queue
- Required ACK window: Critical incidents must ACK within 4 hours, others within 24 hours
Platform Integration Layer Usage
Consumes:- PF-10 (Notifications): Incident notifications, investigation assignments via
@/platform/notifications - PF-11 (Documents): Investigation documents, disciplinary action documentation via
@/platform/documents
Security Considerations
Multi-Tenancy
- ✅ RLS Enforcement: All
hr_incidentsandhr_disciplinary_actionstables filtered byorganization_idvia RLS policies
Role-Based Access Control
- ✅ HR Admin: Full access to all incidents and disciplinary actions
- ✅ Manager: View incidents and disciplinary actions for direct reports
- ✅ Staff: View own incidents only (if permitted)
Data Protection
- ✅ PII Handling: Incident and disciplinary action records may contain sensitive employee information; access controlled via RLS
- ✅ Audit Trail: All incident and disciplinary action changes logged via PF-04
Testing Requirements
- Event payload structure validation
- Event fires on trigger condition (disciplinary action termination, incident creation)
- Correct
organization_idincluded in all events - Subscribers handle events correctly (HR-03, GR-06)
- ACK timeout and retry logic works correctly
- DLQ handling for failed events
- RLS policies enforce org isolation on incident and disciplinary action queries