Document: 00_BACKGROUND.md Module: KPI Matrix (Employee Performance Management) Author: AI Research Agent Date: February 2026 Status: Implemented — original research/rationale retained for context (the module is now built; see README)
1. Project Brief
The KPI Matrix module introduces a structured employee performance management system into ERPat. It automatically collects, calculates, and presents Key Performance Indicators (KPIs) for every employee by leveraging operational data already captured across 12+ existing modules.
Core Principle: ERPat already collects the raw data — attendance logs, task completions, ticket resolutions, timesheet hours, disciplinary records, leave usage, certifications, and skillsets. The KPI Matrix transforms this scattered operational data into a unified, quantifiable performance score that supports:
- Objective employee evaluations (removing subjective bias)
- Automated salary grade step advancement recommendations
- Department-level performance analytics
- Data-driven promotion and development decisions
- Regulatory compliance for performance-based compensation changes
2. Problem Statement
2.1 Current Gaps
ERPat currently has no unified mechanism to evaluate employee performance across modules. Managers must:
-
Manual data gathering — To evaluate an employee, a manager must manually check attendance records, review task completion, look at disciplinary history, check leave patterns, and verify certifications across 6+ separate screens. This process takes 30-60 minutes per employee.
-
No quantified scoring — There is no standardized scoring system. Two managers evaluating the same employee may arrive at different conclusions because there are no defined metrics, weights, or thresholds.
-
Disconnected salary decisions — Salary grade step progression (via
salary_gradesandsalary_history) has no data-driven input. Salary increases are based on tenure or subjective manager assessment, not on measurable performance data. -
No historical trending — There is no way to track an employee's performance trajectory over time. Without period-over-period comparison, it's impossible to identify improving or declining performance trends.
-
Department-level blindness — Organizational leaders cannot compare department performance, identify high-performing teams, or spot departments that need intervention.
-
No target-setting framework — There are no mechanisms to set performance targets (expected values) and measure actuals against them. Without targets, KPI values are just numbers with no context.
-
Audit trail gaps — Performance evaluations that lead to salary decisions lack a formal audit trail linking "this employee scored X on these metrics, therefore they qualify for Y salary step advancement."
2.2 Impact of Gaps
| Gap | Business Impact |
|---|---|
| Manual data gathering | Manager time waste: ~2-4 hours per evaluation cycle per 10 employees |
| No scoring system | Unfair evaluations, employee dissatisfaction, potential legal exposure |
| Disconnected salary decisions | Salary increases not correlated with performance, budget inefficiency |
| No historical trending | Missed early warning signs for underperformance |
| Department blindness | Inability to allocate resources to underperforming teams |
| No targets | Employees lack clarity on what "good performance" means |
| Audit trail gaps | HR compliance risk for performance-based terminations or promotions |
3. Objectives
3.1 Primary Objectives
-
Automated KPI Calculation — Build a computation engine that automatically pulls data from existing modules (attendance, tasks, tickets, timesheets, discipline, leaves, certifications, skillsets) and calculates standardized KPI scores per employee per evaluation period.
-
Configurable KPI Templates — Allow administrators to define KPI templates with customizable categories, metrics, weights, scoring scales, and target values. Different departments or job roles may have different KPI templates.
-
Salary Progression Integration — Link KPI scores to the salary grade step system so that employees who meet or exceed performance targets are automatically recommended for step advancement. This creates a traceable, data-driven path from performance to compensation.
-
Multi-Level Dashboards — Provide performance visibility at three levels:
- Employee level: Personal KPI card with scores, trends, targets
- Department level: Team matrix showing all members' scores
- Organization level: Cross-department analytics and executive summary
-
Review Cycle Management — Support formal review cycles (monthly, quarterly, semi-annual, annual) with manager review, employee acknowledgment, and HR approval workflow.
-
Historical Tracking & Trending — Store calculated KPI scores per period to enable period-over-period comparison, trend analysis, and long-term performance trajectory visualization.
3.2 Secondary Objectives
-
Target Management — Allow setting of individual, department, or role-based targets for each KPI metric. Actuals are measured against these targets to produce context-aware scores.
-
Automated Alerts — Notify managers when employees fall below minimum thresholds or when KPI trends indicate declining performance.
-
Integration with Existing Profile Tab — Add a "KPI" tab to the Team Members profile page (following the existing tab architecture) showing individual performance data.
-
Report Generation — Generate printable/exportable KPI reports for HR records, salary review committees, and regulatory compliance.
-
Timeline Integration — Add KPI-related activities to the system logs and timeline feeds for audit purposes.
-
Future-Proofing — Design the schema and engine to accommodate future KPI types (customer satisfaction scores, revenue metrics, custom formula-based metrics) without schema changes.
4. Scope
4.1 In Scope
| Area | Details |
|---|---|
| Data Sources | Attendance, attendance_metrics, tasks, projects, tickets, timesheets, disciplinary, leave applications, leave credits, schedule, certifications, skillsets, salary grades, salary history, payslips |
| KPI Categories | Attendance & Punctuality, Productivity & Task Performance, Support/Ticket Quality, Behavioral/Disciplinary, Leave Management, Professional Development, Project Delivery, Time Management |
| Calculation | Automated scoring engine with configurable formulas, weights, and normalization |
| Targets | Individual, department-level, and role-based target setting |
| Review Cycles | Monthly, quarterly, semi-annual, annual evaluation periods |
| Dashboards | Employee card, department matrix, organization overview |
| Salary Link | KPI score → salary grade step recommendation → salary_history integration |
| Permissions | Dropdown-type RBAC (Disable/All/Specific) following ERPat pattern |
| Profile Tab | New "Performance" tab on Team Members profile page |
| Audit Trail | System logs for all KPI mutations (score calculation, target changes, reviews) |
| Reports | Exportable KPI reports per employee, department, organization |
4.2 Out of Scope (Future Phases)
| Area | Reason |
|---|---|
| Customer/client satisfaction KPIs | Requires customer feedback system not yet in ERPat |
| Revenue/sales-based KPIs | Requires financial attribution per employee (complex) |
| 360-degree feedback | Peer review system not in current architecture |
| AI-predicted performance | Machine learning model requires historical data first |
| Goal/OKR management | Separate module with different data model |
| External benchmark data | Requires industry-specific data feeds |
| Mobile app interface | ERPat frontend is currently jQuery/Bootstrap |
4.3 Dependencies
| Dependency | Description | Status |
|---|---|---|
| Attendance module | Raw attendance logs and metrics | ✅ Active |
| Tasks module | Task assignments, status, points | ✅ Active |
| Tickets module | Ticket resolution, points, duration | ✅ Active |
| Timesheets module | Time tracking per project/task | ✅ Active |
| Disciplinary module | Infraction records | ✅ Active |
| Leave module | Applications and credit balances | ✅ Active |
| Certifications module | Credential tracking | ✅ Active |
| Skillsets module | Competency mapping | ✅ Active |
| Salary Grades module | Grade/step structure | ✅ Active |
| Salary History module | Rate tracking, progression | ✅ Active |
| Payslips module | Yearly absent/undertime totals | ✅ Active |
| Schedule module | Shift assignments | ✅ Active |
| Payroll module gate | payroll module must be enabled |
✅ Active |
5. Stakeholders
| Role | Interest | Access Level |
|---|---|---|
| System Admin | Full configuration, template design, global targets | Full access |
| HR Manager | Review cycles, salary recommendations, department analytics | All employees |
| Department Manager | Team KPI monitoring, target setting, individual reviews | Own team (via dropdown permission) |
| Team Lead | Team member performance visibility | Specific members |
| Employee | Personal KPI card, self-view of own scores | Self only (readonly) |
| Payroll Admin | Salary increase recommendations from KPI | Salary integration read |
6. Success Criteria
| Criterion | Metric | Target |
|---|---|---|
| Data Coverage | % of KPI metrics sourced from existing data | ≥ 80% (no manual entry for core metrics) |
| Calculation Time | Time to compute all KPIs for 500 employees | < 60 seconds (batch) |
| Manager Time Saved | Time per employee evaluation (before vs after) | 75% reduction (15 min vs 60 min) |
| Salary Correlation | % of salary decisions linked to KPI evidence | ≥ 90% within 6 months |
| Employee Visibility | % of employees who can view own KPI card | 100% (self-view readonly) |
| Adoption Rate | % of managers using KPI data in reviews | ≥ 70% within 3 months |
7. Terminology
| Term | Definition |
|---|---|
| KPI | Key Performance Indicator — a measurable value demonstrating effectiveness |
| KPI Template | A configured set of KPI categories, metrics, and weights for a role/department |
| KPI Score | Calculated numeric value (0-100 scale) for a specific metric in a specific period |
| KPI Composite Score | Weighted average of all KPI scores for an employee in a period |
| Review Cycle | A defined evaluation period (monthly, quarterly, etc.) with a start and end date |
| Target | The expected/desired value for a KPI metric (e.g., "≤ 3 late arrivals per month") |
| Weight | The relative importance of a KPI category in the composite score (0-100%, totaling 100%) |
| Scoring Scale | The method to convert a raw metric value into a normalized score (linear, threshold, bracket) |
| Grade Step | A position within a salary grade band (e.g., Step 3 of Grade 5) |
| Step Advancement | Moving to the next step within the same salary grade, increasing salary by step_increment |
| Normalization | Converting different metric units to a common 0-100 scale for fair comparison |