PeopleOps Lifecycle Closeout and Precedence Skill
Goal
Answer structured closeout, precedence, and reconciliation tasks using the PeopleOps remote environment.
Environment
- Base URL:
http://34.46.77.124:8012 - API endpoints (no auth required for read):
GET /api/employeesGET /api/casesandGET /api/cases/{case_id}GET /api/policiesandGET /api/policies/{policy_id}GET /api/messagesGET /api/documentsGET /api/auditGET /api/recruitmentGET /api/payroll-ledgersGET /api/summary
Workflow
- Read the task prompt in
prompt.txtto identify the target employee, case, or opening. - Read the answer template in
input/payloads/answer_template.jsonto see required fields and allowed enum values. - Fetch all relevant data from the API (case detail, employee, payroll-ledgers, recruitment, audit, messages, documents, policies).
- Apply the business rules below and produce JSON matching the answer template exactly.
- Return only JSON (no markdown, no explanatory text).
Business Rules
1. Source Precedence (Leave / Payroll)
- Approved or submitted assignments control over employee profile summaries.
- Draft, voided, and superseded records must be excluded even when they conflict with profiles.
- For leave: use
approved_leave_daysandpolicy_namefrom the approved/submitted leave assignment inpayroll-ledgers. - For payroll: use the submitted salary assignment; exclude draft planning assignments.
2. Folder Readiness
- A folder is ready only when all required files and all required tags are present.
- Missing files are computed as
required_files - files. - Missing tags are computed as
required_tags - tags.
3. Notice Quality
- Inspect messages and notice packets for defects:
missing_ack_deadlinemissing_appeal_instructionsmissing_waitlist_statusmissing_correct_policy
- If any defect exists,
notice_quality=defectiveand list the defects. - Evidence source for notices should be
notice_packet_inspectionwhen inspecting formal notice packets;message_notice_inspectionis only for informal messages.
4. Closeout Gate Logic
- Approval is not sufficient when the folder or notice is defective.
closeout_blockersmust include every applicable blocker:missing_required_files(when folder lacks required files)missing_required_tags(when folder lacks required tags)defective_formal_notice(when notice has defects)
next_actionfor a blocked closeout with notice defects is typicallyblock_close_and_reissue_notice.escalation_actionfor cases with both folder and notice defects isopen_records_remediation.records_remediation_ownerfor folder issues isRecords; for cross-module escalations it may bePeople Ops Compliance.
5. Recruitment Reconciliation
- Selected candidate = candidate with committee decision "Selected" and accepted offer.
recruitment_cost_total= sum of allamountvalues in the opening'scost_ledger.notice_followup_requiredincludes candidates whose notice status isnot_sentordraft_reissue_required.- Waitlisted candidates get
send_waitlist_notice; rejected candidates getsend_rejection_notice. - Payroll handoff is created only after a selected candidate has an accepted offer.
onboarding_handofffor a new accepted offer with no existing payroll records iscreate_payroll_precheck.handoff_control_resultissubmitted_handoff_required_after_acceptancewhen an accepted offer exists but no submitted payroll assignment is present yet.draft_payroll_allowedistrueonly when draft prechecks are explicitly allowed by policy (defaultfalsefor recruiting handoff).
6. Audit Scope and Event Selection
- Use the audit event that directly supports the business decision as
audit_event_id. supporting_audit_event_idsare other audit events in the same scope.excluded_audit_event_idsare adjacent audit events outside the current scope (e.g., exclude folder/document audits when deciding leave precedence).audit_scopeenum must match the task domain:leave_source_precedence_onlydocument_notice_findings_onlypayroll_assignment_readiness
7. Evidence Source Order
- Order should reflect what was actually examined:
approval_history_folder_notice_auditwhen all four sources existfolder_notice_auditwhen approvals are not relevantaudit_onlywhen only audit events were used
Common Field Mappings
final_decision: derive from the last approval note (e.g., "Approved with conditions" →approved_with_conditions).approval_authority:approverfield from the final approval event.approval_event_id: the approval ID for the final approval step.control_result/final_control_result:- Use
ready_with_monitoringwhen submitted assignment matches accrual batch and no defects exist. - Use
hold_for_folder_and_notice_defectswhen either is defective. - Use
approve_closeoutwhen records are clean.
- Use
effective_date: use the assignment/ledgerupdated_atdate or the employeehire_date, truncated to date only (YYYY-MM-DD).