# dikshit0012/cortexhr-phase-all-task architecture

> Architecture diagram of the GitHub repository dikshit0012/cortexhr-phase-all-task, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dikshit0012/cortexhr-phase-all-task
- Repository: https://github.com/dikshit0012/cortexhr-phase-all-task

## Overview

CortexHR is a collection of research and decision-support experiments and services, not one application. Its major work spans attrition modeling, attendance/payroll anomaly detection, HR chat and integration, resume ranking and fairness, and compensation recommendations. The graph preserves these distinct task workflows rather than implying a shared runtime. Edges are limited to relationships visible in the supplied excerpts or SOURCE INDEX; several unsampled capabilities are represented by their task directories, without inferred internal call sequences.

Main entry points: [`phase-3/task13/src/attrition_v2/model_training.py`](https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-3/task13/src/attrition_v2/model_training.py) (Attrition training), [`phase-2/task09/cortexhr_task9/task 9/src/cortexhr_task9/chat_service.py`](https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-2/task09/cortexhr_task9/task%209/src/cortexhr_task9/chat_service.py) (FAQ chat service), [`phase-2/task07/task 7/src/cortexhr_task7/pipeline.py`](https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-2/task07/task%207/src/cortexhr_task7/pipeline.py) (Explain and rank), [`phase-1/task02/src/cortexhr/features.py`](https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-1/task02/src/cortexhr/features.py) (Feature pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_attrition["Attrition analytics"]
  node_audit["Data audit<br/>[audit.py]"]
  node_features["Feature pipeline<br/>[features.py]"]
  node_baselines["Model baselines<br/>[baselines.py]"]
  node_attritionv2["Attrition training<br/>[model_training.py]"]
  node_attritionexplain["Risk explanations<br/>[pipeline.py]"]
end

subgraph group_anomaly["Anomaly services"]
  node_attendance["Attendance detection"]
  node_payroll["Payroll detection<br/>[detection.py]"]
  node_anomalypipeline["Explain and rank<br/>[pipeline.py]"]
  node_anomalyapi["Anomaly API<br/>[main.py]"]
  node_anomalyservice["Scoring service<br/>[scoring.py]"]
end

subgraph group_hrchat["HR chat integration"]
  node_faqchat["FAQ chat service<br/>[chat_service.py]"]
  node_intent["Intent classifier<br/>[intent_model.py]"]
  node_faq["Approved answers<br/>[faq.py]"]
  node_integration["HR integration"]
end

subgraph group_hiring["Hiring fairness"]
  node_ranking["Resume ranking<br/>[ranking_engine.py]"]
  node_fairness["Hiring fairness audit<br/>[fairness_audit.py]"]
end

subgraph group_compensation["Compensation analytics"]
  node_payfairness["Fair-pay analysis<br/>[pipeline.py]"]
  node_salarybands["Pay bands<br/>[bands.py]"]
end

node_user(("HR analyst"))

node_user -.->|"initiates task"| node_audit
node_user -.->|"submits records"| node_anomalyapi
node_user -.->|"asks question"| node_faqchat
node_user -.->|"starts analysis"| node_ranking
node_user -.->|"starts analysis"| node_attritionv2
node_user -.->|"starts analysis"| node_payfairness
node_features -->|"checks data"| node_audit
node_anomalypipeline -->|"runs detector"| node_attendance
node_anomalypipeline -->|"runs detection"| node_payroll
node_anomalyapi -->|"scores records"| node_anomalyservice
node_faqchat -->|"loads classifier"| node_intent
node_faqchat -->|"loads answers"| node_faq
node_ranking -->|"audited by"| node_fairness
node_payfairness -.->|"builds bands"| node_salarybands
node_attritionv2 -->|"uses features"| node_features
node_attritionv2 -->|"uses evaluation"| node_baselines

click node_audit "https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-1/task01/src/cortexhr/audit.py"
click node_features "https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-1/task02/src/cortexhr/features.py"
click node_baselines "https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-1/task03/src/cortexhr/baselines.py"
click node_attritionv2 "https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-3/task13/src/attrition_v2/model_training.py"
click node_attendance "https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-2/task05/src/cortexhr_task5/attendance_anomaly_detector.py"
click node_payroll "https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-2/task06/task%206/src/cortexhr_task6/detection.py"
click node_anomalypipeline "https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-2/task07/task%207/src/cortexhr_task7/pipeline.py"
click node_anomalyapi "https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-2/task08/task%208/app/main.py"
click node_anomalyservice "https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-2/task08/task%208/app/scoring.py"
click node_faqchat "https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-2/task09/cortexhr_task9/task%209/src/cortexhr_task9/chat_service.py"
click node_intent "https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-2/task09/cortexhr_task9/task%209/src/cortexhr_task9/intent_model.py"
click node_faq "https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-2/task09/cortexhr_task9/task%209/src/cortexhr_task9/faq.py"
click node_integration "https://github.com/dikshit0012/cortexhr-phase-all-task/tree/main/phase-2/task10/src/cortexhr_task10"
click node_ranking "https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-3/task11/src/cortexhr_task11/ranking_engine.py"
click node_fairness "https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-3/task12/src/cortexhr_task12/fairness_audit.py"
click node_attritionexplain "https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-3/task14/src/cortexhr_task14/pipeline.py"
click node_payfairness "https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-3/task15/src/cortexhr_task15/pipeline.py"
click node_salarybands "https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-3/task15/src/cortexhr_task15/bands.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_audit,node_features,node_baselines,node_attritionv2,node_attritionexplain toneBlue
class node_attendance,node_payroll,node_anomalypipeline,node_anomalyapi,node_anomalyservice toneAmber
class node_faqchat,node_intent,node_faq,node_integration toneMint
class node_ranking,node_fairness toneRose
class node_payfairness,node_salarybands,node_user toneIndigo
```

## Components

### Attrition analytics

- [Data audit](https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-1/task01/src/cortexhr/audit.py): `phase-1/task01/src/cortexhr/audit.py`
- [Feature pipeline](https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-1/task02/src/cortexhr/features.py): `phase-1/task02/src/cortexhr/features.py`
- [Model baselines](https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-1/task03/src/cortexhr/baselines.py): `phase-1/task03/src/cortexhr/baselines.py`
- [Attrition training](https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-3/task13/src/attrition_v2/model_training.py): `phase-3/task13/src/attrition_v2/model_training.py`
- [Risk explanations](https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-3/task14/src/cortexhr_task14/pipeline.py): `phase-3/task14/src/cortexhr_task14/pipeline.py`

### Anomaly services

- [Attendance detection](https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-2/task05/src/cortexhr_task5/attendance_anomaly_detector.py): `phase-2/task05/src/cortexhr_task5/attendance_anomaly_detector.py`
- [Payroll detection](https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-2/task06/task%206/src/cortexhr_task6/detection.py): `phase-2/task06/task 6/src/cortexhr_task6/detection.py`
- [Explain and rank](https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-2/task07/task%207/src/cortexhr_task7/pipeline.py): `phase-2/task07/task 7/src/cortexhr_task7/pipeline.py`
- [Anomaly API](https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-2/task08/task%208/app/main.py): `phase-2/task08/task 8/app/main.py`
- [Scoring service](https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-2/task08/task%208/app/scoring.py): `phase-2/task08/task 8/app/scoring.py`

### HR chat integration

- [FAQ chat service](https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-2/task09/cortexhr_task9/task%209/src/cortexhr_task9/chat_service.py): `phase-2/task09/cortexhr_task9/task 9/src/cortexhr_task9/chat_service.py`
- [Intent classifier](https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-2/task09/cortexhr_task9/task%209/src/cortexhr_task9/intent_model.py): `phase-2/task09/cortexhr_task9/task 9/src/cortexhr_task9/intent_model.py`
- [Approved answers](https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-2/task09/cortexhr_task9/task%209/src/cortexhr_task9/faq.py): `phase-2/task09/cortexhr_task9/task 9/src/cortexhr_task9/faq.py`
- [HR integration](https://github.com/dikshit0012/cortexhr-phase-all-task/tree/main/phase-2/task10/src/cortexhr_task10): `phase-2/task10/src/cortexhr_task10`

### Hiring fairness

- [Resume ranking](https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-3/task11/src/cortexhr_task11/ranking_engine.py): `phase-3/task11/src/cortexhr_task11/ranking_engine.py`
- [Hiring fairness audit](https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-3/task12/src/cortexhr_task12/fairness_audit.py): `phase-3/task12/src/cortexhr_task12/fairness_audit.py`

### Compensation analytics

- [Fair-pay analysis](https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-3/task15/src/cortexhr_task15/pipeline.py): `phase-3/task15/src/cortexhr_task15/pipeline.py`
- [Pay bands](https://github.com/dikshit0012/cortexhr-phase-all-task/blob/main/phase-3/task15/src/cortexhr_task15/bands.py): `phase-3/task15/src/cortexhr_task15/bands.py`

### Other components

- **HR analyst**

## Connections

- HR analyst → Data audit: initiates task
- HR analyst → Anomaly API: submits records
- HR analyst → FAQ chat service: asks question
- HR analyst → Resume ranking: starts analysis
- HR analyst → Attrition training: starts analysis
- HR analyst → Fair-pay analysis: starts analysis
- Feature pipeline → Data audit: checks data (evidence: `phase-1/task02/src/cortexhr/features.py`)
- Explain and rank → Attendance detection: runs detector (evidence: `phase-2/task07/task 7/src/cortexhr_task7/pipeline.py`)
- Explain and rank → Payroll detection: runs detection (evidence: `phase-2/task07/task 7/src/cortexhr_task7/pipeline.py`)
- Anomaly API → Scoring service: scores records (evidence: `phase-2/task08/task 8/app/main.py`)
- FAQ chat service → Intent classifier: loads classifier (evidence: `phase-2/task09/cortexhr_task9/task 9/src/cortexhr_task9/chat_service.py`)
- FAQ chat service → Approved answers: loads answers (evidence: `phase-2/task09/cortexhr_task9/task 9/src/cortexhr_task9/chat_service.py`)
- Resume ranking → Hiring fairness audit: audited by (evidence: `phase-3/task12/src/cortexhr_task12/fairness_audit.py`)
- Fair-pay analysis → Pay bands: builds bands (evidence: `phase-3/task15/src/cortexhr_task15/pipeline.py`)
- Attrition training → Feature pipeline: uses features (evidence: `phase-3/task13/run_task13.py`)
- Attrition training → Model baselines: uses evaluation (evidence: `phase-3/task13/run_task13.py`)
