Skip to content

Packs / hr-and-people-public

leave-requests

Handle leave requests without overlaps and keep each person's balance right

L2 Checks passed 3 of 3 runsv1.0.0Tech-Realm/space-hr-and-people-public

Install

logicpacks pack use hr-and-people-public/leave-requests
get_pack hr-and-people-public/leave-requests

The 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

  1. Request -> approved/rejected/cancelled; an approved leave can only be cancelled.
  2. Overlapping requests for the same person are rejected (rejected/cancelled ones don't count).
  3. Balance = yearly allowance - approved days (refflow leave_balance).
  4. 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.