Status: v0.3 · 2026-11-25 (known defects added; release v1.3 supervisors, ADR-031; values still MOCK) What this is: A fictional “hours of work” rule set for the prototype’s rules engine, modelled on real public sources. It is not the actual agreement covering Saskatchewan correctional officers, and it isn’t legal or labour-relations advice. Every rule is labelled with what it’s based on, so a reviewer can see what’s real and what’s made up.
| Code | Source | What we took from it |
|---|---|---|
| SEA | The Saskatchewan Employment Act and Saskatchewan Employment Standards guidance | The legal floor: 8 consecutive hours’ rest in any 24 h; no more than 16 h of work in any 24 h, except in an emergency |
| PSGE | SGEU–Government of Saskatchewan PS/GE Collective Bargaining Agreement 2022–2025 (Articles 9 and 11) | Overtime rates and minimums, rest days, modified 12-hour patterns, breaks. It covers the public service and mentions corrections workers. Check whether a newer agreement or local letters of understanding apply. |
| CX | Treasury Board – UCCO-SACC-CSN Correctional Services (CX) agreement, Article 21 (federal correctional officers) | Rest between shifts, consecutive days, days of rest, schedule posting, short-notice change premium, equitable overtime distribution, limits on 16-hour shifts in a cycle |
| NU | Government of Nunavut HR manual, shift-work policy (HRM 1202) | Maximum consecutive hours, consecutive shifts, consecutive days |
| NWT | GNWT–UNW agreement, Appendix A2 (corrections officers) | Maximum 7 consecutive shifts |
| MOCK | Invented for the prototype | Plausible values where no public source was found; needs validation |
Important caveat: the PS/GE agreement says 12-hour (modified) patterns need a local agreement, approved by both parties. The exact rules at a Saskatchewan correctional centre are likely set out in local letters of understanding that aren’t public. That’s exactly where real-world input is needed (§6).
Severity: Block = can’t be saved. An emergency override exists only where marked “emergency override” (U-01, U-03, U-05, and U-06 when built). Every other Block, including U-08, U-09 and U-14, can’t be overridden in v1 (ADR-023) · Warn = needs acknowledgement · Info = guides the decision · Pay = affects how hours are classified for payroll.
| ID | Rule (plain language) | Default | Severity | Based on |
|---|---|---|---|---|
| U-01 | At least 8 consecutive hours of rest in any 24-hour period | 8 h | Block (emergency override) | SEA (statutory floor) |
| U-02 | Target 12 hours between the end of one regular shift and the start of the next | 12 h | Warn | MOCK, aimed above the floor. CX makes 8 h a “reasonable effort” target |
| U-03 | After a 16-hour shift, at least 12 hours off before the next shift. DORMANT: the live row is keyed to the retired L16 template, so no new shift can match it and a 12 h shift plus an extension never triggers it. A 12 h + extension day is still bounded by U-02 (Warn under 12 h rest), U-04 (Warn under 10 h after an extension of 4 h or more), U-01 (Block under 8 h rest) and U-05 (Block above 16 h worked); only the dedicated 12 h-rest Block is missing |
12 h | Block (emergency override) | MOCK. No public rule found. CX gives 12 h rest after court attendance, which is an analogous concept |
| U-04 | After an overtime extension of 4 h or more, at least 10 hours off before the next shift | 10 h | Warn | MOCK |
| U-05 | No more than 16 hours worked in any 24-hour period | 16 h | Block (emergency override) | SEA |
| U-06 | No more than 16 consecutive hours on duty, and no more than 2 shifts back-to-back | 16 h / 2 | Block (emergency override), specified but not in rule set v1 (§3) | NU |
| U-07 | Forward rotation preferred (days → evenings → nights); flag a backward rotation inside a work block | — | Warn | MOCK (common fatigue-management practice) |
| ID | Rule | Default | Severity | Based on |
|---|---|---|---|---|
| U-08 | Maximum consecutive work days (8-hour pattern) | 7 | Block (scheduled), no emergency override in v1 (override policy ACKNOWLEDGE; editable per rule through the rules admin approval flow); Warn (overtime-caused) | NWT, NU (7); CX allows up to 8 |
| U-09 | Maximum consecutive 12-hour shifts | 4 | Block (scheduled), no emergency override in v1 (override policy ACKNOWLEDGE; editable per rule through the rules admin approval flow); Warn (overtime-caused) | MOCK, matching common “4 on, 4 off” patterns |
| U-10 | Maximum consecutive 12-hour overnight shifts (19:00–07:00; A12 00:00–12:00 and N12 19:00–07:00 count) | 4 | Warn | MOCK (fatigue) |
| U-11 | Maximum 16-hour shifts: 3 in any 7 days, 10 in any 28 days. DORMANT: it counts L16 shifts only (retired), so no new shift can trigger it |
3 / 7 d · 10 / 28 d | Warn | MOCK, inspired by CX limits on 16-hour shifts within a work cycle |
| U-12 | At least 2 consecutive days of rest in each 7-day period; a break of 24 h or less doesn’t count as a day of rest | 2 days / 7 | Warn | CX, PSGE (two consecutive rest days normally), NU |
| ID | Rule | Default | Severity | Based on |
|---|---|---|---|---|
| U-13 | Regular hours average 8 h × working days over the rotation cycle. Not built, so P-01 is not cycle-averaged | per pattern | Info | PSGE (modified patterns) |
| U-14 | Weekly ceiling, including overtime: warn above 48 h, block above 60 h (the limit itself passes, like every other limit; exactly 60 h is a warning). The planner’s warning group is named by the warning level, “Week over 48 hours” | 48 / 60 | Warn above 48 h; Block above 60 h, no emergency override in v1 (override policy ACKNOWLEDGE; editable per rule through the rules admin approval flow) | MOCK |
| U-15 | Overtime status shown on the planning board: under / approaching (within 8 h of the threshold) / in overtime | per period | Info | MOCK (feature) |
| ID | Rule | Default | Severity | Based on |
|---|---|---|---|---|
| P-01 | Overtime is based on total hours in the period (known limit: a 4-on/4-off 12 h crew works 84 to 96 h per 14-day period, so with the 80 h threshold it is in built-in overtime until U-13 averaging is built): hours worked beyond the threshold (80 h per 2-week pay period) are overtime. Known limit: the table offers a WEEK window, but the validator refuses it (“a weekly threshold needs a per-week split first”), so the pay-period threshold is the only one in this prototype. Rostered 12 h and 16 h shifts aren’t overtime by themselves. | 80 h / pay period | Pay | Lead’s direction; relies on an averaging / modified work arrangement (SEA, PSGE 9.3.5.2) |
| P-01b | Overtime rate bands in a pay period: default all overtime hours at 1.5×; an optional band (e.g. 2× beyond a set number of overtime hours) can be switched on | 1.5× | Pay | MOCK (PSGE pays 1.5× for the first 4 h then 2× per occurrence; confirm local practice) |
| P-02 | Any hours on an assigned day of rest: 2×, with a 2-hour minimum | 2× / 2 h · off by default | Pay | PSGE; confirm whether it applies alongside period-based overtime |
| P-03 | Call-back: minimum 2 hours at overtime rates | 2 h | Pay | PSGE |
| P-04 | Overtime under 30 minutes isn’t paid | 0.5 h | Pay | PSGE |
| P-05 | Shift changed on short notice (under 96 h): first changed shift gets a premium (code CHG) |
96 h | Pay / Warn | CX (pays 1.75×; our rate is a placeholder) |
| P-06 | Statutory holiday worked | placeholder | Pay | MOCK, to confirm |
Absence pay codes (placeholder, to confirm). A recorded absence pays the shift’s hours under one pay code: vacation under VAC, and every other absence (sick and “other”, FR-51) under SICK. There is no separate OTHER pay code in this prototype, so an “other” absence (bereavement, jury duty and the like) shows as SICK hours in the payroll CSV. Which code each kind of leave should use is a question for real practice.
| ID | Rule | Default | Severity | Based on |
|---|---|---|---|---|
| S-01 | Schedules posted at least 28 days before they start | 28 d | Warn | CX |
| S-02 | No more than 1 change of an officer’s regular shift per cycle without their consent (a change and a return count as one) | 1 | Warn | CX |
| S-03 | 12- and 16-hour patterns allowed only on units flagged as having a local agreement | per unit | Block | PSGE |
| S-04 | Overtime must be authorized by a supervisor, recorded with name and time | — | Block (workflow-enforced, not a decision table, ADR-019): EXTRA shifts and overtime offers are created or confirmed only by a SUPERVISOR, and each writes an audit event with actor and time |
PSGE (written authorization) |
| ID | Rule | Default | Severity | Based on |
|---|---|---|---|---|
| O-01 | Offer overtime equitably among available, qualified officers | — | Info (ranking) | CX |
| O-02 | Ranking: fewest overtime hours this quarter first, ties broken by seniority inside the rank (the service date for an officer, the promotion date for a supervisor; release v1.3) | quarter / seniority | Info | MOCK (CX leaves the method to local agreement) |
| O-03 | Officers who would break a Block rule (e.g. U-01, U-03, U-05) are skipped, shown as “bypassed: insufficient rest”, and not penalized in the ranking | — | Info | MOCK. Whether a bypassed officer loses their turn has been disputed in practice, so this is a judgment call to confirm |
| O-04 | Voluntary first. Ordered (mandatory) overtime only after the voluntary list is used up, in reverse ranking, at most once per officer every 14 days | 14 d | Warn | MOCK. CX case law found that chronic reliance on ordered overtime to cover staffing shortages is inconsistent with the agreement |
| ID | Rule | Default | Severity | Based on |
|---|---|---|---|---|
| R-01 | A supervisor post needs a supervisor. An officer is blocked with no override; an officer who holds the Acting supervisor qualification (ACTING_SUP) on the shift’s date may work it, as a warning the supervisor acknowledges |
supervisors only | Block (no override); Warn/acknowledge when acting | Owner item 17 (placeholder) |
| R-02 | A supervisor on an officer post is a warning the supervisor acknowledges; the shift counts toward the unit minimum | officers only | Warn/acknowledge | Owner item 17 (placeholder) |
Every other rule in this document applies to supervisors as written. The planner never cross-covers (it keeps each rank on its own posts), so R-01 and R-02 are for a manual assignment.
| ID | Rule | Default | Severity | Based on |
|---|---|---|---|---|
| L-01 | Allowed regular lengths: 8 h and 12 h. There is no 16 h regular shift: a 16 h day is a 12 h shift plus a 4 h extension. 12 h only on units with a local agreement (S-03). Known defect: the live rule row still lists [8,12,16] and its message says “8, 12 and 16-hour”; the fix is a new rule version (roadmap package 1). |
— | Block | Lead’s direction + PSGE (modified work patterns over 8 h need a local agreement) |
| L-02 | Breaks: 2 × 15 min per 8-hour shift, 3 per 12-hour shift (shown only; not scheduled) | — | Info | PSGE |
To keep the build realistic, the prototype implements a core set and documents the rest.
| Implement (Must) | Document only (future) |
|---|---|
| U-01, U-02, U-03, U-04, U-05, U-08, U-09, U-10, U-11, U-12, U-14, U-15 · P-01, P-01b, P-04 · S-03, S-04 (workflow, ADR-019) · O-01, O-02, O-03 · L-01 · R-01, R-02 (release v1.3) | U-06, U-07, U-13 · P-02, P-03, P-05, P-06 · S-01, S-02 · O-04 · L-02 |
Known defects (2026-11-24). U-03 and U-11 are dormant (keyed to the retired L16); L-01 still allows [8,12,16]; P-01’s 80 h threshold makes 4-on/4-off crews built-in overtime and U-13 averaging is not built. Fixes need new rule rows (a new rule-set version after v4, which release v1.3 uses for who can work a post), changes to the demo’s version numbers, OT figures and payroll golden, so they are on the roadmap, not in this submission (docs/roadmap.md, package 1).
Implementation notes (2026-11-20). U-04 is a live Warn row in rule set v1 (docs/04 §3 and docs/10 §3 already require its boundary tests; 4 h extension trigger, 10 h rest). U-15 stays a Must feature but is not a decision-table row: under / approaching / in-overtime is a pay-period status, computed with the pay classification (P-01) and shown on the planning board — a rolling hours window cannot express it. S-04 is enforced by the workflow (ADR-019). Override policy (ADR-023): U-01, U-03 and U-05 are EMERGENCY (overridable with a reason of ≥ 10 characters, audited). U-08, U-09 and U-14 are Blocks with policy ACKNOWLEDGE, so the api refuses any override. The policy is a column of each rule row, changed through maker/checker like any value. Rule set v1 therefore has 19 rows across the 8 tables.
Release 4 (2026-11-22). Rule set v3 (V12) adds U-16 to the shift-types table: an 8-hour officer assigned to a night shift is a Warn the supervisor acknowledges, with the message “An 8-hour officer is assigned to a night shift; 8-hour officers work day or evening.” It is a person-directed safeguard, not a new clause in the agreement, and it is not in the Must list above. The planner never produces the assignment (the 100/120/150 plan fingerprints are unchanged); the row fires only for a manual assignment. Version 2 stays as history; v3 is a baseline seed like v1 and v2, so subsequent edits use maker/checker.
Release v1.3 (2026-11-24). Rule set v4 adds the ninth table, Who can work a post, with R-01 and R-02 (section H): an officer on a supervisor post is blocked with no override unless they hold the Acting supervisor qualification (then a Warn to acknowledge), and a supervisor on an officer post is a Warn to acknowledge. The owner approved these answers to the plan’s cross-cover question. Both are Must rows from v4 on: the publish check refuses a version without them and keeps their override policy. A rules admin edits them on the rules screen (/rules/{version}/posts) through the same draft, build, submit, approve and publish steps as any row. Version 4 moved no pin, because the datasets had no supervisors then. Since S4 every dataset has supervisors on two posts; the planner keeps each rank on its own posts, so R-01 and R-02 fire on manual assignments, draft edits and proposals only. Supervisors follow every other rule as written (owner answer Q5), the pay rules P-01, P-01b and P-04 included; many real agreements exclude supervisors from overtime, and a later rule row could scope P-01 by position. Overtime is offered from separate pools by position (O-01/O-02 inside the rank; acting officers after every supervisor on a post), and a supervisor never changes their own records (docs/09-access-control.md; ADR-031).
The rules are grouped into Drools decision tables (see 04-rules-engine.md §5). The derived facts each table needs are computed by Java fact builders. The “rule type” names below are now those fact/template pairs:
| Rule type | Used by |
|---|---|
MinRestInWindow |
U-01 |
MinRestBetweenShifts (optional “after shift of kind X”) |
U-02, U-03, U-04 |
MaxHoursInWindow |
U-05, U-14 |
MaxConsecutive (days, or shifts of a kind) |
U-08, U-09, U-10, U-06 |
MaxCountInPeriod (rolling window) |
U-11 (and trades later) |
MinConsecutiveDaysOff |
U-12 |
HoursThresholdStatus |
U-15 |
PayClassification (ordered bands: first N h at rate A, then rate B; minimums) |
P-01 to P-06 |
| (none: workflow-enforced, ADR-019) | S-04: only a SUPERVISOR can create or confirm EXTRA shifts and overtime offers (API role check), and every one writes an audit event with actor and time. No rule table. |
RankingPolicy + eligibility filter |
O-01 to O-04 |
AllowedShiftLengths |
L-01 |
PostEligibility (position against the post’s kind, with an acting qualification) |
R-01, R-02 |
agreement: "Mock Hours-of-Work Schedule (fictional) v0.1"
effectiveFrom: 2026-10-01
rules:
- code: U-01
type: MinRestInWindow
params: { minHours: 8, windowHours: 24 }
severity: Block
overridable: emergency
source: "SEA s.2-13"
- code: U-03
type: MinRestBetweenShifts
params: { afterShiftKind: Long16, minHours: 12 }
severity: Block
overridable: emergency
source: "MOCK"
- code: U-09
type: MaxConsecutive
params: { unit: Shift, shiftKind: Regular12, max: 4 }
severity: { scheduled: Block, overtime: Warn }
overridable: none # override policy ACKNOWLEDGE in v1 (ADR-023)
source: "MOCK"
- code: U-11
type: MaxCountInPeriod
params: { event: Long16, limits: [ { days: 7, max: 3 }, { days: 28, max: 10 } ] }
severity: Warn
source: "MOCK (cf. CX 16-hour limits in a cycle)"
- code: P-01
type: PayClassification
params: { window: PayPeriod, thresholdHours: 80, countPaidLeave: false, bands: [ { hours: null, code: OT15 } ], minimumUnpaidHours: 0.5 }
source: "Lead's direction (period-based overtime)"