diff --git a/Crewing-Implementation-Spec.md b/Crewing-Implementation-Spec.md index d2b75cb..e11a9d4 100644 --- a/Crewing-Implementation-Spec.md +++ b/Crewing-Implementation-Spec.md @@ -416,13 +416,21 @@ with these reconciliations: > login creation for management ranks (`grantsLogin`) is a deferred follow-up**. > > **Phase 4** is in progress as stacked sub-PRs: **4a Crew records & profile + PPE -> (Epics E, F) ✅**, **4b Leave & attendance (Epic G) — pending**, **4c Sign-off & +> (Epics E, F) ✅**, **4b Leave & attendance (Epic G) ✅**, **4c Sign-off & > experience (Epic K) — pending**. 4a applies role-based PII masking server-side > (bank/Aadhaar full only for Accounts; salary hidden from site staff, §6/§8.8). > Deferrals carried in 4a: site-staff own-site scoping (needs a User↔Site link), > the records **verify queue** (§8.11 → Phase 5), and the Pay-status tab beyond the -> salary structure (→ payroll, Phase 6). The leave-clash auto-backfill in 4b will -> reuse the Phase-2 `autoRaiseRequisition` helper. +> salary structure (→ payroll, Phase 6). +> +> **R6 clash detection — reconciled to Option A (director decision):** a +> `VesselRankRequirement{vesselId, rankId, minStrength}` configures required crew +> strength per rank per vessel; approving a leave that drops active same-rank cover +> over the window **below `minStrength`** (default 1 when unconfigured) auto-raises +> a `LEAVE` requisition (reuses the Phase-2 `autoRaiseRequisition`). A follow-up +> **crewing-admin** PR adds the office UI to manage requirements, **Manager direct +> crew placement** (assign crew to a vessel/site without a requisition), and +> **Admin crew CRUD**, behind a new `manage_crew` permission. 1. **Foundations** — `SITE_STAFF` role; crewing schema + enums; permissions; `CREWING_ENABLED` flag; nav scaffold; reference data (Ranks, RankDocRequirements). 2. **Requisitions + relief** (Epic A) — requisition lifecycle, relief requests, and the shared `autoRaiseRequisition` backfill helper. *(Epic K sign-off/experience originally sat here; moved to Phase 4 — see status note above, as it depends on the onboarding/assignment schema.)*