Packs / hr-and-people-public
leave-requests
Handle leave requests without overlaps and keep each person's balance right
Install
logicpacks pack use hr-and-people-public/leave-requestsget_pack hr-and-people-public/leave-requestsThe second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.
Keys it needs (names only)
None.
Playbooks included
- Spec:
spec/SPEC.md(goal, steps, edge cases, don’ts) - Routes:
stdlib-referencefrappe-hr - Checks: 2 in
outcome/checks.yaml - Code:
refflow.pyschema.json - Tools: python3, docker
Usage, last 8 weeks
New: no recorded use yet.
Purpose (from spec/SPEC.md)
Goal
Handle leave requests without overlaps and keep each person's balance right. Our reference flow (code/refflow.py, stdlib sqlite) proves the records, allowed moves, numbers and export; the same rules carry over to the self-hosted app.
Steps
- Request -> approved/rejected/cancelled; an approved leave can only be cancelled.
- Overlapping requests for the same person are rejected (rejected/cancelled ones don't count).
- Balance = yearly allowance - approved days (refflow
leave_balance). - Export the month for payroll.
Edge cases
- Half days: days = 0.5.
- Public holidays are not subtracted automatically; enter working days.
Don'ts
- Don't put medical details in the request; 'sick' is enough.
Check
lp pack check hr-and-people/leave-requests runs outcome/checks.yaml.