PeopleOps Lifecycle Verification Skill
Overview
Verify employee lifecycle records (onboarding, leave, payroll, recruitment, policy cases) in the Northwind People Lifecycle Portal by querying its REST API and applying source-precedence rules. Return structured JSON answers using normalized business labels from the task's answer template.
Environment
- Base URL:
<TASK_ENV_BASE_URL>(staged remote URL; never localhost) - Login via web UI if needed:
ops.lead@peopleops.local/PeopleOps#2026 - All data is accessible through read-only REST endpoints; no write actions are required for verification tasks.
Core API Endpoints
Query these endpoints with ?q=<search> filters:
/api/employees?q=<id_or_name>— profile, status, leave balance/api/cases/<case_id>— full case detail (approvals, attachments, audit events, comments)/api/cases?q=<query>— case list/api/payroll-ledgers?q=<employee_id>— leave assignments, salary assignments, adjustments/api/recruitment?q=<opening_id>— candidates, offers, cost ledger, notice packets, payroll prechecks/api/documents?q=<case_or_doc_id>— folder checklists (required vs filed files/tags)/api/messages?q=<case_id>— formal notices (quality, defects)/api/audit?q=<case_or_employee_id>— audit events/api/policies— policy documents (source-precedence rules)
Source-Precedence Rules (from policies)
Apply these consistently:
- Leave: The latest Approved or Submitted leave assignment for the period controls. Draft, voided, and obsolete records are excluded even when employee profile summaries conflict.
- Payroll: The current Submitted salary assignment controls base salary. Draft planning assignments do not affect payroll readiness or accrual checks.
- Recruitment payroll handoff: Created only after a selected candidate has an accepted offer. The handoff must be submitted; draft prechecks do not satisfy the assignment gate.
- Documents: A folder is not ready unless all
required_filesare present infilesand allrequired_tagsare present intags.
Task-Type Playbooks
A. Onboarding / Lifecycle Closeout (single employee)
- Get
/api/employees?q=<employee_id>for profile and status. - Get
/api/payroll-ledgers?q=<employee_id>for all assignments. - Identify the authoritative records:
- Leave: select
status="Approved"(or latestSubmitted) assignment for the effective period. - Exclude:
Draft,Superseded, or older assignments. - Payroll: select
status="Submitted"salary assignment. - Exclude:
Draftsalary assignments.
- Leave: select
- Determine
closeout_actionandfinal_control_result:- If records are clean (no missing folder files, no defective notices, no draft interfering), use
approve_onboarding_close/approve_closeout. - If the formal notice is defective or folder is incomplete, use
block_close_and_reissue_notice/hold_for_folder_and_notice_defects. - If data needs remediation, use
open_records_remediation.
- If records are clean (no missing folder files, no defective notices, no draft interfering), use
- Map enum values from the answer template exactly.
B. Policy Case Review (remote work, lifecycle hold)
- Get
/api/cases/<case_id>for approvals, attachments, audit events. - Get
/api/documents?q=<case_id>for folder checklist. - Get
/api/messages?q=<case_id>for formal notice inspection. - Get
/api/audit?q=<case_id>for supporting audit events. - Evaluate:
- Final decision:
approved_with_conditionsif approval note says so; otherwise match approvaldecision. - Folder ready: true only when
required_files⊆filesANDrequired_tags⊆tags. - Missing files: compute
required_files - files. - Required tag present: compute
required_tagsintersection withtags. - Notice quality:
validif messagedefectsis empty; elsedefective. - Notice defects: map from message
defectsarray directly. - Audit scope:
document_notice_findings_onlyfor folder/notice cases;leave_source_precedence_onlyfor leave cases;payroll_assignment_readinessfor payroll cases. - Excluded audit events: adjacent events from a different scope (e.g., a folder/notice audit event is excluded when deciding leave-source precedence, and vice versa).
- Final decision:
- Set
approval_closeout_gate:approval_not_sufficient_when_folder_or_notice_defectiveif any blocker exists.approval_sufficient_when_records_cleanotherwise.
C. Recruitment Reconciliation
- Get
/api/recruitment?q=<opening_id>. - Classify candidates by
committee_decisionintoselected_candidate,waitlisted_candidates,rejected_candidates. - Check
offer_registerfor offer status of selected candidate. - Sum all
cost_ledgeramounts forrecruitment_cost_total. - Check
notice_packetsfor required follow-up:- Waitlisted candidates without sent notices →
send_waitlist_notice. - Rejected candidates without sent notices →
send_rejection_notice.
- Waitlisted candidates without sent notices →
- Determine
onboarding_handoff:- If selected candidate has
acceptedoffer, usecreate_submitted_assignment_after_acceptance. - If no accepted offer, use
no_payroll_handoff.
- If selected candidate has
- Set enums from the answer template (e.g.,
candidate_outcome_control,cost_source,notice_quality_source).
D. Leave Source Precedence
- Get employee profile (
/api/employees) and payroll ledgers (/api/payroll-ledgers). - Compare profile
leave_balance_days/policyagainst the latest Approved/Submitted assignment. - If they conflict, the approved assignment wins per
LEAVE-SRC-001. - Identify the controlling audit event (e.g.,
leave.profile_mismatch) and supporting/excluded events by scope. - Set
precedence_sourcetoapproved_assignment_over_profilewhen the assignment overrides the profile. - Set
profile_policy_ignoredtotruewhen the profile is stale.
E. Payroll Assignment Readiness
- Get
/api/payroll-ledgers?q=<employee_id>. - Select the
Submittedsalary assignment as authoritative. - Identify the
Draftassignment to exclude. - Verify accrual readiness via the case audit event or ledger
accrual_batch_id. - Map to enums:
payroll_source_status: submitted,draft_exclusion_rule: exclude_draft_assignment,audit_scope: payroll_assignment_readiness.
Normalized Business Labels (Critical)
Always use the exact enum values from the answer template. Common labels include:
leave_source:leave_assignment_history,employee_profile_summary,case_summary_onlyleave_precedence_source/precedence_source:approved_assignment_current_period,profile_summary_current_period,case_summary_only,approved_assignment_over_profilepayroll_source_status/payroll_status:submitted,draft,supersededcloseout_action/next_action:approve_onboarding_close,block_close_and_reissue_notice,open_records_remediation,update_employee_summary,no_actionfinal_control_result/control_result:approve_closeout,hold_for_folder_and_notice_defects,ready_with_monitoringapproval_closeout_gate:approval_sufficient_when_records_clean,approval_not_sufficient_when_folder_or_notice_defectiveaudit_scope:document_notice_findings_only,leave_source_precedence_only,payroll_assignment_readinessnotice_quality:valid,defectivenotice_defects:missing_ack_deadline,missing_appeal_instructions,missing_waitlist_status,missing_correct_policyfinal_decision:approved_with_conditions,approved,rejected,heldcandidate_outcome_control:committee_decision_with_offer_confirmation,message_status_only,case_summary_onlyhandoff_control_result:submitted_handoff_required_after_acceptance,submitted_handoff_required,no_handoff_requireddraft_exclusion_rule:exclude_draft_assignment,draft_allowed,exclude_superseded_only
Output Rules
- Return only a single JSON object matching the task's
input/payloads/answer_template.json. - Do not wrap in markdown code fences or add explanatory text.
- For array fields, include only the requested identifiers (candidate IDs, audit IDs, file names, etc.).
- For numeric sums (e.g.,
recruitment_cost_total), sum all items from the authoritative ledger. - For boolean fields, use JSON
true/false.
Common Pitfalls
- Using profile summary instead of assignment history — The employee profile may be stale; always check payroll ledgers and apply policy source precedence.
- Including draft records — Draft assignments, draft notices, and draft payroll records must be excluded unless the template explicitly allows them.
- Missing cross-module audit events — A case may have audit events from multiple scopes; include only those matching the current decision scope and explicitly exclude adjacent ones.
- Folder readiness logic — A folder is ready only when both required files and required tags are fully satisfied.
- Notice quality from the wrong source — Inspect the message/notice packet (
/api/messagesornotice_packets), not the case summary, for defects. - Recruitment cost total — Sum all lines in the recruitment
cost_ledger, not just a subset. - Enum exactness — Copy enum values character-for-character from the answer template; even slight differences will fail validation.