specs/hr/HR-09-applicant-tracking-system.md (v1.0)Plan:
specs/hr/HR-09-applicant-tracking-system-PLAN.md (v1.0)Status: ✅ Implemented (Core Features)
Last Updated: 2026-02-09
Overview
This document defines the integration contracts for the HR-09 Applicant Tracking System (ATS). The ATS integrates with multiple platform features and HR modules to provide a seamless hiring workflow from job posting to employee onboarding.Implementation Status
Core Features (✅ Implemented):- ✅ Job postings and candidate management
- ✅ Application tracking with multi-stage workflow
- ✅ Offer creation, sending, and acceptance
- ✅ Employee creation triggered on offer acceptance
- ✅ Automatic onboarding initiation (
candidate_hiredevent +createOnboardingForHire) - ✅ Multi-tenant RLS security
- ✅
useHireWithOnboardinghook for manual triggering
- 🟡 Notification integrations (interview reminders, status updates)
- 📝 Job board integrations (Indeed, LinkedIn) - Phase 5.4
- 📝 Background check provider integration - Phase 5.2
- 📝 Reference checking workflow - Phase 5.1
- 📝 Candidate communication templates - Phase 5.3
Event Contracts
Published Events
Payload: hr_reference_completed
Purpose: Notifies workflow system when a reference check is completed by the referee.
Status: 📝 Planned (Phase 5.1)
- All UUIDs are required and must reference existing entities
reference_ratingis nullable (referee may decline to rate)reference_statusenum:completed|declined- Enum values and field names match
hr_referencestable schema - Version: Compatible with Phase 5.1+ implementations
Payload: hr_background_check_completed
Purpose: Notifies offer workflow and other systems when a background check reaches a terminal state.
Status: 📝 Planned (Phase 5.2)
- All UUIDs are required and must reference existing entities
background_check_statusenum:cleared|flagged|cancelled|disputed|failedfcra_adverse_action_requiredboolean indicates if FCRA workflow is triggeredresult_summaryandreport_urlare nullable- Enum values and field names match
hr_background_checkstable schema - Version: Compatible with Phase 5.2+ implementations
Payload: hr_job_board_application_received
Purpose: Notifies ATS when a candidate applies via external job board; triggers application creation.
Status: 📝 Planned (Phase 5.4)
- All UUIDs are required;
job_posting_idmust reference existinghr_job_postingsrow source_boardenum matcheshr_job_board_postings.board_namevaluesexternal_application_idis the board’s unique application identifier- Contact fields:
candidate_emailrequired;candidate_phonenullable resume_urlandcover_letter_textnullable (not all boards provide both)source_metadataJSONB for board-specific fields (e.g., Indeed’s sponsored flag)- Version: Compatible with Phase 5.4+ implementations
hr_employee_hired Event (formerly candidate_hired)
Purpose: Notifies HR-03 Onboarding to start onboarding workflow for new hire.Status: ✅ Implemented in
src/cores/hr/services/hiring/publishCandidateHiredEvent.ts
src/cores/hr/hooks/useOfferMutation.ts - acceptOffer mutation
offer_accepted Event
Purpose: Triggers employee record creation in HR-01.Status: ✅ Implemented (via database trigger + event publishing)
interview_scheduled Event
Purpose: Notifies interviewers and candidates of scheduled interviews.
application_received Event
Purpose: Notifies HR of new application and sends confirmation to candidate.
Consumed Events
API Contracts
Exposed APIs
APIs exposed by HR-09 ATS for consumption by other modules.Get Candidate by Employee
Endpoint:GET /api/v1/hr/candidates/by-employee/{employee_id}Purpose: Retrieve candidate profile linked to an employee record.
Consumers: HR-01 (Employee Directory)
Status: 📝 Planned Response:
Get Hiring Pipeline Metrics
Endpoint:GET /api/v1/hr/ats/pipeline-metricsPurpose: Retrieve pipeline metrics for dashboard widgets.
Consumers: HR Dashboard, LO Dashboard
Status: 📝 Planned Query Parameters:
organization_id(required)date_from(optional)date_to(optional)department_id(optional)
Consumed APIs
APIs consumed by HR-09 ATS from other modules.Platform Integration Layer Usage
PF-08 (Forms) Integration
Location:@/platform/formsPurpose: Application forms, interview feedback forms Usage:
PF-10 (Notifications) Integration
Location:@/platform/notificationsPurpose: Application confirmations, interview reminders, status updates Notification Templates:
hr-ats-application-received- Candidate confirmationhr-ats-interview-reminder- 24h and 1h remindershr-ats-offer-sent- Offer letter notificationhr-ats-status-update- Application status change
PF-11 (Documents) Integration
Location:@/platform/documentsPurpose: Resume/CV storage, offer letter PDFs Storage Buckets:
hr-ats-resumes- Candidate resume uploadshr-ats-offer-letters- Generated offer letter PDFs
PF-12 (Reports) Integration
Location:@/platform/reportsPurpose: Recruiting reports, EEO reports Report Templates:
hr-ats-pipeline-report- Pipeline metricshr-ats-time-to-fill-report- Time-to-fill analyticshr-ats-source-effectiveness-report- Source ROIhr-ats-eeo-report- EEO-1 data export
Database Function Contracts
hr_create_employee_from_offer()
Purpose: Automatically create employee record when offer is accepted.
Signature:
- Validates offer exists and is in ‘accepted’ status
- Creates
hr_employeesrecord with mapped fields - Creates
hr_hire_transitionsrecord - Returns new employee_id
create_onboarding_from_template()
Purpose: Create an onboarding instance from a template for a new hire.Status: ✅ Implemented Signature:
src/cores/hr/services/hiring/createOnboardingForHire.ts
Auto-Onboarding Flow
When an offer is accepted, the following sequence occurs:hr_module_settings.auto_create_onboarding- Enable/disable automatic onboardinghr_module_settings.default_onboarding_template_id- Template to use
Security Considerations
RLS Policy Requirements
All ATS tables usehr_has_org_access() SECURITY DEFINER function to prevent RLS recursion.
Access Levels:
- HR Admin: Full access to all ATS data within organization
- Hiring Manager: Read/write for positions in their department
- Interviewer: Read for assigned interviews, write for feedback
- Candidate: Read-only for own applications and offer details
EEO Data Protection
EEO data inhr_candidates table requires additional access restrictions:
- Encrypted at rest
- Accessible only to HR Admin and Compliance Officer roles
- Audit logging for all EEO data access
- Excluded from standard data exports
References
- Spec:
specs/hr/HR-09-applicant-tracking-system.md - Plan:
specs/hr/HR-09-applicant-tracking-system-PLAN.md - Constitution:
constitution.md§5.7 (RLS patterns) - Integration Overview:
docs/architecture/integrations/index.md