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-20
Spec: HR-15 Compensation Management
Constitution Reference: Section 1.2 (Core Independence), Section 1.3 (Integration Patterns)
Overview
HR-15 manages compensation structures, salary bands, merit increases, and total compensation statements. It publishes events for compensation cost allocation and merit increases, and integrates with HR-07 (Payroll) and FA (Finance).Integration Points
Platform Foundation (PF) Dependencies
Required PF Features:- PF-11 (Documents): Total compensation statement PDFs
- PF-10 (Notifications): Merit increase notifications
Consumer Core Dependencies (Downstream)
Internal HR Features:- HR-01 (Employee Directory): Employee context, current salary
- HR-07 (Payroll): Salary updates, compensation data
- HR-10 (Performance): Performance ratings for merit increases
- FA (Finance): Compensation cost allocation to GL accounts
Event Contracts
Event: hr_merit_increase_approved
Publisher: HR (HR-15)Subscribers: HR-07 (Payroll), FA (Finance)
Status: 📝 Planned Purpose: Notify payroll and finance of approved merit increases Publish Trigger: When
hr_merit_increases.status = 'approved' is set
Payload Schema:
docs/architecture/integrations/EVENT_CONTRACTS.md for complete event contract documentation.
Event: hr_compensation_cost_allocated
Publisher: HR (HR-15)Subscribers: FA (Finance)
Status: 📝 Planned Purpose: Map compensation data to GL accounts based on department/cost center Publish Trigger: When compensation changes (real-time) or nightly batch (for bulk updates) Payload Schema:
- Subscribe to
hr_compensation_cost_allocatedevents - Map compensation data to GL accounts based on department/cost center
- Update financial records with labor cost allocations
Event: hr_compensation_analysis_completed
Publisher: HR (HR-15)Subscribers: FA (Finance)
Status: 📝 Planned Purpose: Notify finance of completed compensation analyses Publish Trigger: When
hr_compensation_analyses.status = 'approved' is set
Payload Schema:
docs/architecture/integrations/EVENT_CONTRACTS.md for complete event contract documentation.
Events Consumed
hr_performance_review_completed
Publisher: HR-10 (Performance Management)Subscriber: HR-15 (Compensation Management)
Status: 📝 Planned Purpose: Trigger merit increase planning workflow when performance review is completed Payload Schema: See
docs/architecture/integrations/EVENT_CONTRACTS.md for full schema.
Implementation Note: The hr_performance_review_completed event trigger must be created in HR-10 before HR-15 can consume it.
Alternative Read-Only Access (if events not used)
- FA can have read-only access to
hr_salary_bandsandhr_total_compensation_statementstables - Access controlled via RLS policies using
hr_has_org_accessfunction - Refresh cadence: Real-time queries or nightly batch sync
Platform Integration Layer Usage
Consumes:- PF-11 (Documents): Total compensation statement PDFs via
@/platform/documents - PF-10 (Notifications): Merit increase notifications via
@/platform/notifications
Security Considerations
Multi-Tenancy
- ✅ RLS Enforcement: All
hr_compensation_*andhr_salary_*tables filtered byorganization_idvia RLS policies
Role-Based Access Control
- ✅ HR Admin: Full access to all compensation data
- ✅ Manager: View compensation for direct reports (if permitted)
- ✅ Staff: View own compensation statements only
Data Protection
- ✅ PII Handling: Compensation data is highly sensitive; access controlled via RLS
- ✅ Audit Trail: All compensation changes logged via PF-04
Testing Requirements
- Event payload structure validation
- Event fires on trigger condition (merit increase approval, compensation change, analysis completion)
- Correct
organization_idincluded in all events - Subscribers handle events correctly (HR-07, FA)
- RLS policies enforce org isolation on compensation queries
- Alternative read-only access works correctly if events not used