A productivity bonus over a target
The rule
A day whose output reaches a target rate (at least 12 boxes an hour) pays a bonus for every hour worked that day (1.50 an hour). A day short of the target, even by one unit, pays none.
Who uses it
Warehouses, distribution centers and production lines that reward sustained output without paying by the piece: the bonus rewards pace while pay stays hourly.
How the recipe does it
Configuration only: a package (package.toml) of one layer running the
standard productivity_bonus step.
[[layer]]id = "bonus"[[layer.step]]id = "bonus"uses = "standard/productivity_bonus"params = { measure = "boxes", at_least = 12, per_hour = 150, pay = "pay", category = "bonus" }For each day it adds up the worked time (ctx:time_in) and the units
(ctx:quantity_in). The target is checked on exact time, units times an
hour against the target times the time worked, so no rounding of hours can
tip a day over or under. A day that meets it pays per_hour for each hour,
to the exact time (ctx:money_for), added as money (ctx:add_quantity).
What your setup needs
Set up before you adopt the recipe; the recipe’s steps read them by name, and adopting it is refused, with a list of what is missing, until they exist.
- A measure called
pay: the amount the recipe adds up (money in a currency, or a count).
The scenarios show each as it was set up for them.
Parameters
| Parameter | Meaning |
|---|---|
measure | The count measure of output. |
at_least | The target, in units an hour. |
per_hour | The bonus for each hour worked, in minor units. |
pay | The money measure the bonus is added in. |
category | The bonus’s category. |
counts | The categories whose time counts (default every worked one). |
What the scenarios show
exactly-at-the-target-earns-it: 96 boxes in 8 hours (exactly 12 an hour) earns 12.00; 95 earns nothing.a-part-hour-counts-exactly: 90 boxes in 7.5 hours is exactly on target and earns 11.25.
Legal note
This is a common way companies implement a productivity bonus; check the rules where you operate. A nondiscretionary bonus usually has to be included in the regular rate used to pay overtime for the same period.
Get the recipe
The recipe’s package and its scenarios are in the example packages repository: attendance/productivity_bonus. Test it, or your own copy of it, with hourctl attend test, and publish it with hourctl attend pkg publish.
The policy package
The package’s layers, with the standard steps each one runs and their settings:
name = "productivity_bonus"version = "1.0.0"description = "An hourly bonus for every hour of a day whose output meets a target rate, decided on exact time."
# What the tenant must have set up for the recipe: the steps read these by name.[needs]measures = ["pay"]
# A day of at least 12 boxes an hour pays a bonus of 1.50 for each hour# worked, to the exact time.[[layer]]id = "bonus"[[layer.step]]id = "bonus"uses = "standard/productivity_bonus"params = { measure = "boxes", at_least = 12, per_hour = 150, pay = "pay", category = "bonus" }Scenarios
Each scenario gives a person’s punches and setup and the timecard they must produce, worked out with this package adopted (the format).
Seven and a half hours and 90 boxes is exactly 12 an hour: the target is checked on exact time (90 boxes times an hour against 12 times the time worked), and the bonus is 1.50 for each of the 7.5 hours, 11.25. The unpaid half-hour lunch is not time worked
description = "Seven and a half hours and 90 boxes is exactly 12 an hour: the target is checked on exact time (90 boxes times an hour against 12 times the time worked), and the bonus is 1.50 for each of the 7.5 hours, 11.25. The unpaid half-hour lunch is not time worked"
punch = [ { at = "2026-10-05 08:00", kind = "in" }, { at = "2026-10-05 12:00", kind = "lunch_start" }, { at = "2026-10-05 12:30", kind = "lunch_end" }, { at = "2026-10-05 16:00", kind = "out" },]
[policy]zone = "America/Chicago"
[[measure]]id = "boxes"kind = "count"
[[measure]]id = "pay"kind = "money"currency = "USD"
[[labor]]workday = "2026-10-05"measure = "boxes"quantity = 90category = "pieces"
[expect]week = "2026-10-05"worked = "7h 30m"quantities = [ "2026-10-05 boxes 90 pieces", "2026-10-05 pay 11.25 USD bonus",]A bonus of 1.50 an hour for a day of at least 12 boxes an hour: 96 boxes in 8 hours is exactly 12 and earns 12.00; 95 the next day falls short and earns nothing
description = "A bonus of 1.50 an hour for a day of at least 12 boxes an hour: 96 boxes in 8 hours is exactly 12 and earns 12.00; 95 the next day falls short and earns nothing"
punch = [ { at = "2026-10-05 08:00", kind = "in" }, { at = "2026-10-05 16:00", kind = "out" }, { at = "2026-10-06 08:00", kind = "in" }, { at = "2026-10-06 16:00", kind = "out" },]
[policy]zone = "America/Chicago"
[[measure]]id = "boxes"kind = "count"
[[measure]]id = "pay"kind = "money"currency = "USD"
[[labor]]workday = "2026-10-05"measure = "boxes"quantity = 96category = "pieces"
[[labor]]workday = "2026-10-06"measure = "boxes"quantity = 95category = "pieces"
[expect]week = "2026-10-05"quantities = [ "2026-10-05 boxes 96 pieces", "2026-10-05 pay 12.00 USD bonus", "2026-10-06 boxes 95 pieces",]