Product Requirements Document
LeaveTrack v1.0 — 8 user stories (US-01..08), each tracing to a BRD requirement.
Raw file, for copying into your project
sample-project/docs/prd/PRD-LeaveTrack-v1.0.md — traces to BRD-LeaveTrack-v1.0.md
User Roles
| Role | Description |
|---|---|
| Employee | Submits requests, views own balance |
| Manager | Approves/rejects requests for direct reports only |
| HR Admin | Configures leave policies, runs audit reports |
User Stories
US-01 — Submit a Leave Request (BR-01)
As an Employee, I want to submit a leave request with type, start date, end date, and reason, so that my manager can review it without email.
- Given valid dates and a selected leave type, when I submit, then a request is created with status
pendingand my manager is notified. - Given an end date before the start date, when I submit, then the form rejects it with a validation error and no request is created.
- Given a date range that exceeds my remaining balance for that leave type, when I submit, then I see a warning but may still submit for HR override.
US-02 — View My Leave Balance (BR-03, BR-06)
As an Employee, I want to see my current balance per leave type, so that I know what I have available before requesting.
- Given I have an assigned leave policy, when I open my balance page, then I see current balance per leave type, updated as of the last completed monthly accrual.
- Given a pending request exists, when I view my balance, then the pending amount is shown separately from the confirmed balance (not yet deducted).
US-03 — Approve or Reject a Request (BR-02)
As a Manager, I want to approve or reject a pending leave request from one of my direct reports, so that the decision is recorded and the employee is notified.
- Given a pending request from my direct report, when I approve it, then its status becomes
approved, the employee's balance is decremented, and an audit record is created. - Given a pending request from my direct report, when I reject it with a reason, then its status becomes
rejected, no balance change occurs, and an audit record is created. - Given a request from an employee who is NOT my direct report, when I attempt to view or act on it, then the system returns a 403 and the request never appears in my queue.
US-04 — Manager Sees Only Their Team (BR-02)
As a Manager, I want my request queue to show only my direct reports, so that I never see or act on another team's requests.
- Given I manage 5 employees, when I open my approvals queue, then I see requests from exactly those 5 and no one else.
- Given an org-chart change moves an employee to a different manager, when the change takes effect, then the employee's pending requests move to the new manager's queue.
US-05 — HR Audit Report (BR-04)
As an HR Admin, I want to query the full decision history for any employee or date range, so that I can produce compliance records on request.
- Given any employee ID, when I run the audit report, then I see every request they've made with status, decision-maker, and timestamp, going back at least 3 years.
- Given a completed request, when I view its record, then I can see it was never hard-deleted — only soft-deleted records are excluded from active views, never purged.
US-06 — Mobile-Responsive Submission (BR-05)
As an Employee on a mobile browser, I want to submit and check requests as easily as on desktop, so that I'm not blocked by not having a laptop.
- Given a viewport of 375px width, when I open the submit-request form, then all fields are usable without horizontal scrolling.
- Given a mobile browser, when I check my balance, then the page loads and renders correctly without a desktop-only layout.
US-07 — Monthly Balance Accrual (BR-06)
As the System, I want to accrue leave balances automatically on a monthly schedule, so that HR never has to update balances by hand.
- Given an employee's assigned policy grants 1.25 days/month for Vacation, when the monthly accrual job runs, then their Vacation balance increases by exactly 1.25 days.
- Given the accrual job has already run for the current month, when it is triggered again, then it does not double-accrue (idempotent).
US-08 — Independently Tracked Leave Types (BR-07)
As an Employee, I want Vacation, Sick, and Unpaid tracked separately, so that using one doesn't affect the others.
- Given I request Sick leave, when it's approved, then only my Sick balance is decremented — Vacation and Unpaid are unaffected.
- Given Unpaid leave has no balance policy, when I request it, then no balance check blocks the submission.
Non-Functional Requirements
- p95 API response time under 500ms for balance and request-list endpoints
- All approval-affecting endpoints require an authenticated session; scoped-visibility (US-03 AC3, US-04) is enforced server-side, never client-side only
Out of Scope
Everything in the BRD's Out of Scope section: payroll integration, multi-country holiday calendars, biometric attendance.