Codex 5.3 Refactor Note: Canonical refactor plan: docs/CODEX-5.3-REFACTOR-PLAN.md. This document is retained for historical and implementation context during the refactor. This flow has been refreshed to reflect the current worktree as of 2026-04-26.
System Flow
Access & Onboarding
flowchart TD
A[User opens system] --> B[Login]
B -->|Forgot Password| FP[Forgot Password]
B -->|Request Access| RA[Request Access]
RA -->|Submit| AR[(AccessRequest: PENDING)]
AR --> N1[Notify Admin/HR]
N1 --> ADM[Admin reviews]
ADM -->|Approve| U[(User Created + Role Assigned)]
ADM -->|Reject| RJ[(Request Rejected)]
U --> E1[Send setup/reset email]
E1 --> B
Candidate Workflow
flowchart TD
HRD[HR Dashboard] --> UPL[Upload Resume]
UPL --> C0[(Candidate: NEW + Resume)]
C0 --> HR7[HR Screening]
HR7 -->|Complete| C1[(HR_SCREENED)]
C1 -->|Assign Manager| C2[(MANAGER_EVAL_PENDING)]
C2 --> NM[Notify Manager]
NM --> ML[Manager Magic Link]
NM --> M8[Manager Review]
ML --> M8
M8 -->|Non-PROCEED submit| C3[(MANAGER_REVIEWED)]
M8 -->|PROCEED submit| CDD[(CANDIDATE_DEEP_DIVE_PENDING)]
CDD --> DQ[Send Candidate Deep-Dive Questionnaire]
DQ --> DR[Candidate submits deep-dive response]
DR --> C3
C3 -->|Escalate| C4[(TO_SMO)]
C4 --> NS[Notify SMO]
NS --> SI[SMO Interview]
SI --> S10[SMO Decision]
S10 -->|Approve| CA[(APPROVED)]
S10 -->|Reject| CR[(REJECTED)]
S10 -->|KIV| CK[(KIV)]
CA --> BCAST[Internal Broadcast: Company-All]
CR --> BCAST
CK --> BCAST
Role entry notes
- HR dashboard currently works
NEW,HR_SCREENED, andCANDIDATE_DEEP_DIVE_PENDING. - Manager access to candidate detail is assignment-based, with
/manager-review/[token]available as an alternate entry path. - SMO dashboard queue is
TO_SMO, while the candidate list also exposes reviewed and historical decision statuses. - A code-backed role audit is stored in docs/ROLE-FLOW-CHECK-2026-04-26.md.
Audit & Notifications Outbox
flowchart LR
ACTION[User Action] --> AUD[(Audit Log Append)]
ACTION --> EVT[(Domain Event)]
EVT --> OUT[(Outbox)]
OUT --> DELIV[(Outbox Log)]
DELIV --> INAPP[In-app Notification]
DELIV --> EMAIL[Email via Resend]