Skip to content

One person's own agreement

The rule

Most people follow the company’s rules; a few have their own written into their contract: a 35-hour week where the company’s is 39, a different overtime threshold, a phased return to work. Their agreement applies to them and to no one else, and shows in their timecard as theirs.

Who uses it

Any employer with individual contracts: France’s individual working-time agreements, part-time or phased-return arrangements, executives and specialists on negotiated terms.

How the recipe does it

Configuration only. The package (package.toml) is the company’s rule, overtime past 39 hours a week:

[[layer]]
id = "company"
[[layer.step]]
id = "weekly"
uses = "standard/threshold"
params = { over = "39h", to = "overtime", window = "week" }

An agreement is the tenant’s own layer, whose eligibility rule names the person, and which changes the package’s step:

[[layer]]
id = "agreement-4471"
order = 30
applies_to = "person = 4471"
[[layer.step]]
id = "weekly"
change = "params"
params = { over = "35h" }
  • person = 4471 picks one employee record. An agreement made with the human, whichever of a group’s employers they work for, names the worker id that links their records instead: worker = w-17.
  • order = 30 puts it after the company’s, jurisdiction’s and union’s layers, so the agreement has the last word on what it changes, unless one of them locks it (a legal rule a contract may not undercut).
  • The layer is dated as any is: an agreement from a day is a revision from that day.

Where many people share terms, a rule on what they share is better than a layer each: an employment attribute (attributes.contract = part_time) or an organization (under unions:local-42).

Parameters

SettingMeaning
applies_toperson = <id>, or worker = <id>.
The layer’s changesWhatever the agreement changes.

What the scenarios show

  • the-agreement-is-theirs: employee 4471’s 37 hours have 2 of overtime past their 35.
  • everyone-else-keeps-the-company-rule: someone else’s 37 hours have none.
  • an-agreement-that-follows-the-worker: an agreement written for worker w-17 applies to their record at another employer.

Individual agreements usually cannot undercut the law or a collective agreement that covers the person. Check the rules where you operate.

Get the recipe

The recipe’s package and its scenarios are in the example packages repository: attendance/individual_agreement. 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:

individual_agreement/package.toml
name = "individual_agreement"
version = "1.0.0"
description = "An individual agreement (a shorter week, other overtime) as a policy layer for one employee, or for one worker across every employer's record of them."
# The company's rule: overtime past 39 hours a week. A person's own
# agreement is a layer of the tenant's, picked by an eligibility rule
# naming them.
[[layer]]
id = "company"
[[layer.step]]
id = "weekly"
uses = "standard/threshold"
params = { over = "39h", to = "overtime", window = "week" }

Scenarios

Each scenario gives a person’s punches and setup and the timecard they must produce, worked out with this package adopted (the format).

An agreement made with the human rather than one employment follows the worker id that links their records: written for worker w-17, it applies to their record 5120 at another of the group's employers too
scenarios/an-agreement-that-follows-the-worker.toml
description = "An agreement made with the human rather than one employment follows the worker id that links their records: written for worker w-17, it applies to their record 5120 at another of the group's employers too"
punch = [
{ at = "2026-10-05 09:00", kind = "in" }, { at = "2026-10-05 17:00", kind = "out" },
{ at = "2026-10-06 09:00", kind = "in" }, { at = "2026-10-06 17:00", kind = "out" },
{ at = "2026-10-07 09:00", kind = "in" }, { at = "2026-10-07 17:00", kind = "out" },
{ at = "2026-10-08 09:00", kind = "in" }, { at = "2026-10-08 17:00", kind = "out" },
{ at = "2026-10-09 09:00", kind = "in" }, { at = "2026-10-09 14:00", kind = "out" },
]
[policy]
zone = "Europe/Paris"
# One worker's own agreement, whichever employer's record: 35 hours.
[[layer]]
id = "agreement-w-17"
order = 30
applies_to = "worker = w-17"
[[layer.step]]
id = "weekly"
change = "params"
params = { over = "35h" }
[person]
id = "5120"
worker = "w-17"
[expect]
week = "2026-10-05"
allocations = [
"2026-10-05 09:00-17:00 work 8.00",
"2026-10-06 09:00-17:00 work 8.00",
"2026-10-07 09:00-17:00 work 8.00",
"2026-10-08 09:00-17:00 work 8.00",
"2026-10-09 09:00-12:00 work 3.00",
"2026-10-09 12:00-14:00 overtime 2.00",
]
Anyone else working the same 37 hours keeps the company's 39-hour week: no overtime
scenarios/everyone-else-keeps-the-company-rule.toml
description = "Anyone else working the same 37 hours keeps the company's 39-hour week: no overtime"
punch = [
{ at = "2026-10-05 09:00", kind = "in" }, { at = "2026-10-05 17:00", kind = "out" },
{ at = "2026-10-06 09:00", kind = "in" }, { at = "2026-10-06 17:00", kind = "out" },
{ at = "2026-10-07 09:00", kind = "in" }, { at = "2026-10-07 17:00", kind = "out" },
{ at = "2026-10-08 09:00", kind = "in" }, { at = "2026-10-08 17:00", kind = "out" },
{ at = "2026-10-09 09:00", kind = "in" }, { at = "2026-10-09 14:00", kind = "out" },
]
[policy]
zone = "Europe/Paris"
# One employee's own agreement: 35 hours.
[[layer]]
id = "agreement-4471"
order = 30
applies_to = "person = 4471"
[[layer.step]]
id = "weekly"
change = "params"
params = { over = "35h" }
[person]
id = "4472"
[expect]
week = "2026-10-05"
allocations = [
"2026-10-05 09:00-17:00 work 8.00",
"2026-10-06 09:00-17:00 work 8.00",
"2026-10-07 09:00-17:00 work 8.00",
"2026-10-08 09:00-17:00 work 8.00",
"2026-10-09 09:00-14:00 work 5.00",
]
Employee 4471's own agreement sets a 35-hour week: their 37 hours have 2 hours of overtime
scenarios/the-agreement-is-theirs.toml
description = "Employee 4471's own agreement sets a 35-hour week: their 37 hours have 2 hours of overtime"
punch = [
{ at = "2026-10-05 09:00", kind = "in" }, { at = "2026-10-05 17:00", kind = "out" },
{ at = "2026-10-06 09:00", kind = "in" }, { at = "2026-10-06 17:00", kind = "out" },
{ at = "2026-10-07 09:00", kind = "in" }, { at = "2026-10-07 17:00", kind = "out" },
{ at = "2026-10-08 09:00", kind = "in" }, { at = "2026-10-08 17:00", kind = "out" },
{ at = "2026-10-09 09:00", kind = "in" }, { at = "2026-10-09 14:00", kind = "out" },
]
[policy]
zone = "Europe/Paris"
# One employee's own agreement: 35 hours.
[[layer]]
id = "agreement-4471"
order = 30
applies_to = "person = 4471"
[[layer.step]]
id = "weekly"
change = "params"
params = { over = "35h" }
[person]
id = "4471"
[expect]
week = "2026-10-05"
allocations = [
"2026-10-05 09:00-17:00 work 8.00",
"2026-10-06 09:00-17:00 work 8.00",
"2026-10-07 09:00-17:00 work 8.00",
"2026-10-08 09:00-17:00 work 8.00",
"2026-10-09 09:00-12:00 work 3.00",
"2026-10-09 12:00-14:00 overtime 2.00",
]