
# HR AI Execution Plan
Date: 2026-03-16

This document contains **step‑by‑step prompts** designed for AI coding tools
(Codex, Copilot, Claude, etc.) to build the HR module gradually without modifying existing project files.

RULES FOR THE AI TOOL:
- Follow existing project architecture.
- Do not modify existing modules.
- Generate only the requested step.
- Stop after each step.
- Use Laravel best practices.

------------------------------------------------
PHASE 1 — HR SETUP TABLES
------------------------------------------------

Prompt 1:
Create Laravel migrations for:
- hr_departments
- hr_designations
- hr_grades
- hr_contract_types

Rules:
snake_case naming
timestamps
stop after migrations

Prompt 2:
Create migrations for:
- hr_leave_types
- hr_permission_types
- hr_loan_types
- hr_bonus_types
- hr_penalty_types
- hr_earning_types
- hr_deduction_types

Stop after migrations.

Prompt 3:
Generate models for all HR setup tables.

Path:
app/Models/HR/Setup

Relationships only.
No business logic.

------------------------------------------------
PHASE 2 — RECRUITMENT MODULE
------------------------------------------------

Prompt 4:
Create migrations for:
- hr_job_requests
- hr_candidates
- hr_candidate_documents

Prompt 5:
Create migrations for:
- hr_interviews
- hr_interview_evaluations
- hr_job_offers

Prompt 6:
Generate models under:
app/Models/HR/Recruitment

Prompt 7:
Create services:
app/Services/HR/Recruitment

Services:
CandidateService
InterviewService
JobOfferService

Prompt 8:
Create controllers:
Admin/HR/Recruitment

------------------------------------------------
PHASE 3 — EMPLOYEE MASTER
------------------------------------------------

Prompt 9:
Create migrations for:
- hr_employees
- hr_employee_contracts
- hr_employee_documents

Prompt 10:
Create migrations for:
- hr_employee_salary_profiles
- hr_employee_allowances
- hr_employee_deductions

Prompt 11:
Generate employee models.

Prompt 12:
Create EmployeeService.

Prompt 13:
Create EmployeeController.

------------------------------------------------
PHASE 4 — ATTENDANCE
------------------------------------------------

Prompt 14:
Create migrations for:
- hr_attendance_records
- hr_overtime_records
- hr_absence_records

Prompt 15:
Create AttendanceService.

Prompt 16:
Create AttendanceController.

------------------------------------------------
PHASE 5 — HR REQUESTS
------------------------------------------------

Prompt 17:
Create migrations for:
- hr_leave_requests
- hr_permission_requests

Prompt 18:
Create migrations for:
- hr_loan_requests
- hr_data_change_requests
- hr_complaint_requests
- hr_resignation_requests

Prompt 19:
Create RequestService.

Prompt 20:
Create RequestControllers.

------------------------------------------------
PHASE 6 — PAYROLL
------------------------------------------------

Prompt 21:
Create migrations for:
- hr_payroll_periods
- hr_payroll_runs

Prompt 22:
Create migrations for:
- hr_payroll_lines
- hr_payroll_line_items

Prompt 23:
Create migrations for:
- hr_salary_payments
- hr_payroll_postings
- hr_end_of_service_settlements

Prompt 24:
Create PayrollService.

Prompt 25:
Create PayrollController.

------------------------------------------------
PHASE 7 — EMPLOYEE PORTAL
------------------------------------------------

Prompt 26:
Create portal controllers:
app/Http/Controllers/Portal

Prompt 27:
Create portal views:
resources/views/portal

Pages:
MyProfile
MyRequests
MyAttendance
MyPayroll
MyTasks

------------------------------------------------
PHASE 8 — HR TASK MANAGEMENT
------------------------------------------------

Prompt 28:
Create migrations:
- hr_tasks
- hr_task_comments
- hr_task_attachments

Prompt 29:
Create TaskService.

Prompt 30:
Create TaskController.

------------------------------------------------
PHASE 9 — ANALYTICS
------------------------------------------------

Prompt 31:
Create HR Dashboard service.

Prompt 32:
Create analytics queries for:
- employee statistics
- attendance statistics
- payroll cost analysis

Prompt 33:
Create dashboard view.

------------------------------------------------
END OF EXECUTION PLAN
------------------------------------------------
