feat(crewing): Phase 3b — recruitment pipeline (flagged) #67

Merged
shad0w merged 2 commits from feat/crewing-pipeline into feat/crewing-candidates 2026-06-22 18:49:29 +00:00
Owner

Crewing — Phase 3b (Recruitment pipeline)

Second slice of Phase 3 (3a candidates → 3b pipeline → 3c onboarding). Stacks on #66 (3a candidates); base branch is feat/crewing-candidates, so nothing reaches master yet. Behind NEXT_PUBLIC_CREWING_ENABLED.

What's in

  • Schema (crewing_pipeline migration): Application (one per requisition+candidate) + 7-stage ApplicationStage (SHORTLISTED → COMPETENCY_AND_REFERENCES → DOC_VERIFICATION → SALARY_AGREEMENT → PROPOSED → INTERVIEW → SELECTED; → REJECTED; ONBOARDED is 3c); ApplicationGate (SALARY/SELECTION/WAIVER pending = Manager queue); ReferenceCheck; effective-dated SalaryStructure (on the Application now, bound to the assignment in 3c); minimal BankDetail/EpfDetail captured at DOC_VERIFICATION (PII encryption → Phase 4). CrewAction += applicationId.
  • State machine lib/application-pipeline.ts — sourcing advances MPO/Manager; approve_salary + select Manager-only; orthogonal canReject.
  • Actions: addApplication (first candidate → requisition SHORTLISTING), advanceStage, recordReferenceCheck, verifyDocuments (bank/EPF), agreeSalary→approveSalary/returnSalary, recordInterviewResult, requestInterviewWaiver→approve/decline, selectCandidate (→ requisition SELECTED)/returnSelection, rejectApplication. Waiver never automatic (R2). Notifications SALARY/SELECTION/WAIVER + CANDIDATE_PROPOSED.
  • Screens: pipeline board per requisition (7 columns + Add candidate); application workhorse (7-step stepper + adaptive per-stage action card); "Open pipeline" on the requisition detail.
  • Central /approvals (§8.13 R8): pending crewing gates (Salary/Selection/Waiver) listed with inline Approve/Return alongside POs — one unified Manager queue.

Tests & docs

  • Unit: application-pipeline.test.ts (9). Integration: applications.test.ts (10) — full happy path, salary/selection/waiver approvals + Manager-only gating, failed interview, reject, site-staff lockout.
  • type-check clean; full unit (234) + integration (163) green.
  • CLAUDE.md updated; wiki §12 status note records the 3a/3b/3c split.

Deferred

  • Onboarding (Epic D, Phase 3c): SELECTED → ONBOARDED, CrewAssignment, employeeId, requisition → FILLED, binding the approved salary to the assignment.

🤖 Generated with Claude Code


Closes Epic C — Recruitment pipeline (#77).

## Crewing — Phase 3b (Recruitment pipeline) Second slice of **Phase 3** (3a candidates → **3b pipeline** → 3c onboarding). Stacks on **#66** (3a candidates); base branch is `feat/crewing-candidates`, so nothing reaches `master` yet. Behind `NEXT_PUBLIC_CREWING_ENABLED`. ### What's in - **Schema** (`crewing_pipeline` migration): `Application` (one per requisition+candidate) + 7-stage `ApplicationStage` (`SHORTLISTED → COMPETENCY_AND_REFERENCES → DOC_VERIFICATION → SALARY_AGREEMENT → PROPOSED → INTERVIEW → SELECTED`; `→ REJECTED`; `ONBOARDED` is 3c); `ApplicationGate` (SALARY/SELECTION/WAIVER pending = Manager queue); `ReferenceCheck`; effective-dated `SalaryStructure` (on the Application now, bound to the assignment in 3c); minimal `BankDetail`/`EpfDetail` captured at DOC_VERIFICATION (PII encryption → Phase 4). `CrewAction += applicationId`. - **State machine** `lib/application-pipeline.ts` — sourcing advances MPO/Manager; `approve_salary` + `select` Manager-only; orthogonal `canReject`. - **Actions**: addApplication (first candidate → requisition SHORTLISTING), advanceStage, recordReferenceCheck, verifyDocuments (bank/EPF), agreeSalary→approveSalary/returnSalary, recordInterviewResult, requestInterviewWaiver→approve/decline, selectCandidate (→ requisition SELECTED)/returnSelection, rejectApplication. Waiver never automatic (R2). Notifications SALARY/SELECTION/WAIVER + CANDIDATE_PROPOSED. - **Screens**: pipeline board per requisition (7 columns + Add candidate); application workhorse (7-step stepper + adaptive per-stage action card); "Open pipeline" on the requisition detail. - **Central /approvals (§8.13 R8)**: pending crewing gates (Salary/Selection/Waiver) listed with inline Approve/Return alongside POs — one unified Manager queue. ### Tests & docs - Unit: `application-pipeline.test.ts` (9). Integration: `applications.test.ts` (10) — full happy path, salary/selection/waiver approvals + Manager-only gating, failed interview, reject, site-staff lockout. - `type-check` clean; full unit (234) + integration (163) green. - `CLAUDE.md` updated; wiki §12 status note records the 3a/3b/3c split. ### Deferred - Onboarding (Epic D, **Phase 3c**): SELECTED → ONBOARDED, `CrewAssignment`, `employeeId`, requisition → FILLED, binding the approved salary to the assignment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- Closes **Epic C — Recruitment pipeline** (#77).
shad0w added 1 commit 2026-06-22 13:28:57 +00:00
feat(crewing): Phase 3b — recruitment pipeline (flagged)
All checks were successful
PR checks / checks (pull_request) Successful in 40s
PR checks / integration (pull_request) Successful in 30s
3ec3a2b4ef
Second slice of Phase 3 (stacked on 3a candidates). The gated 7-stage
recruitment pipeline per Crewing-Implementation-Spec §5.1/§8.4–8.5/§8.13.
Behind NEXT_PUBLIC_CREWING_ENABLED; production unchanged.

What's in
- Schema (crewing_pipeline migration): Application (one per requisition+candidate)
  + 7-stage ApplicationStage; ApplicationGate (SALARY/SELECTION/WAIVER pending =
  Manager queue items); ReferenceCheck; effective-dated SalaryStructure (attached
  to the Application now, bound to the assignment in 3c); minimal BankDetail/EpfDetail
  captured at DOC_VERIFICATION (PII encryption deferred to Phase 4). CrewAction +=
  applicationId; pipeline CrewActionTypes.
- State machine: lib/application-pipeline.ts — sourcing advances MPO/Manager;
  approve_salary + select are Manager-only; orthogonal canReject; BOARD_STAGES.
- Actions: addApplication (first candidate → requisition SHORTLISTING), advanceStage,
  recordReferenceCheck, verifyDocuments (bank/EPF), agreeSalary→approveSalary/returnSalary,
  recordInterviewResult, requestInterviewWaiver→approve/decline, selectCandidate
  (→ requisition SELECTED)/returnSelection, rejectApplication. Waiver never automatic (R2).
  Notifications SALARY/SELECTION/WAIVER + CANDIDATE_PROPOSED.
- Screens: pipeline board per requisition (7 columns + Add candidate); application
  workhorse (7-step stepper + adaptive per-stage action card); "Open pipeline" on the
  requisition detail. Central /approvals gains a crewing section (inline Approve/Return)
  for one unified Manager queue (§8.13 R8).

Tests & docs
- Unit: application-pipeline.test.ts (9). Integration: applications.test.ts (10) —
  full happy path, salary/selection/waiver approvals + Manager-only gating, failed
  interview, reject, site-staff lockout. type-check clean; full unit (234) + integration
  (163) green.
- CLAUDE.md "Crewing" updated with the Phase 3b surface.

Deferred: onboarding (Epic D, Phase 3c) — SELECTED → ONBOARDED, CrewAssignment,
employeeId, requisition → FILLED, salary bound to the assignment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
shad0w added 1 commit 2026-06-22 18:48:44 +00:00
shad0w force-pushed feat/crewing-pipeline from 71767749d0 to 3ec3a2b4ef 2026-06-22 18:48:53 +00:00 Compare
shad0w added 1 commit 2026-06-22 18:49:12 +00:00
Merge branch 'feat/crewing-candidates' into feat/crewing-pipeline
All checks were successful
PR checks / checks (pull_request) Successful in 39s
PR checks / integration (pull_request) Successful in 28s
79eba5505c
shad0w merged commit 55d69a291a into feat/crewing-candidates 2026-06-22 18:49:29 +00:00
Sign in to join this conversation.
No description provided.