Status: v0.3, the original plan (2026-11-19). It is kept as written; this box says where the build differs (checked 23 Nov 2026).
Where the build differs from this plan
- Built: F1, F2, F3, F5, F7, F8, F10 and F11 (Must, plus the wall display and audit viewer). Added after this plan: the quarter planner with draft edits (ADR-026, ADR-030), D12/N12 crews and datasets 120 and 150 (ADR-027, ADR-028), dated unit closures and staffing (release 3).
- Partly built: F9, the employee shift planner. Propose shifts checks the drafts against the rules together, the officer sends them with a note, and a supervisor in scope or the planner approves or declines each shift on the Proposals inbox (v1.3 P1–P4); there is no sandbox copy of the roster (
10-testing.md§8).- Future work, as planned: F4 trades, F6 notifications, F12 drag and drop, F13.
- Changed: the 16 h shift is retired as a template (ADR-029). A “16 h shift” is a 12 h shift plus an extension of about 4 h, worked as overtime. §8 and the rotations row in §13 below show the original defaults, not what the demo seeds; the 100-officer demo has no 16 h rows.
- The seven-day plan (§9) is superseded by
process/HANDOFF.md§6 and what was built; see release notes.- Names, counts and ports now in use are in INSTALL.md and
10-testing.md§6. Changes: v0.2 widened scope to a full scheduling prototype, removed AI from runtime, and set up three containers. v0.3 moves trades and notifications to future work, and sizes the simulation at 100 officers over 90 days.
Saskatchewan’s Ministry of Corrections, Policing and Public Safety runs adult secure-custody correctional centres 24/7, staffed by correctional officers and managers working rotating shifts. Supervisors build and adjust rosters of 8, 12 and 16-hour shifts while juggling:
Today this is a mix of spreadsheets, phone calls and memory. Mistakes put fatigued officers on posts, pay overtime unfairly, or produce payroll corrections. Staff have little visibility into their own hours or how many trades they have left.
ShiftCircle is a web-based scheduling prototype with a configurable rules engine at its core. Every scheduling action (assigning a shift, a trade, an overtime offer, an employee’s proposed schedule) is checked against the active rules before it can be saved, and the result is explained to the user. A supervisor stays accountable for every change.
| User | Needs | Main screens |
|---|---|---|
| Shift supervisor / scheduler | Build and adjust the roster; see coverage and overtime at a glance; approve proposals; schedule overtime fairly | Planning board, requests inbox, overtime board, time and attendance, reports |
| Correctional officer (employee) | See their schedule and hours; propose shifts they’d like; respond to overtime offers | My schedule, shift planner (proposals), my reports |
| Rules administrator (HR / labour relations) | Change rule values to match the collective agreement without a code change | Rules configuration |
| Wall display (TV in the unit office) | Today’s coverage at a glance | Display mode (read-only) |
| Measure | Target in the prototype |
|---|---|
| Rule-breaking schedule changes saved | Zero without a logged supervisor override |
| Supervisor visibility of overtime | Each person’s overtime status shown live on the planning board |
| Coverage gaps | Planned vs. scheduled vs. actual staff, shown for every post and block |
| Employee self-service | Own hours, overtime and proposals, all visible without asking a supervisor |
| Payroll handoff | A clean export of time by pay code for each pay period |
The assessment notes that extra features don’t automatically earn higher marks, and the demo is capped at five minutes. So features are tiered: Must is the submission, Should gets built if time allows, Could is documented as future work.
| # | Feature | Priority |
|---|---|---|
| F1 | Supervisor planning board: roster grid, coverage bars, overtime badges, rule warnings | Must |
| F2 | Configurable rules engine with a rules admin screen | Must |
| F3 | Employee My Schedule view, with hours summary and overtime status | Must |
| F4 | Future work | |
| F5 | Overtime scheduling: open shift → eligible list (fair-distribution order) → offer → accept → assign | Must |
| F6 | Future work | |
| F7 | Time tracking: scheduled vs. actual, pay codes, pay-period lock, payroll export (CSV) | Must |
| F8 | Reports: hours scheduled vs. worked, overtime, coverage planned vs. actual, for any date range | Must |
| F9 | Employee shift planner: draft a preferred schedule, check it against the rules, send it to the supervisor | Should |
| F10 | TV / wall display mode for today’s coverage | Should |
| F11 | Audit log viewer | Should (logging is a Must; the viewer is a Should) |
| F12 | Drag-and-drop on the planning board | Could |
| F13 | Leave management, seniority bidding, real SSO | Could, as future work |
Future work (designed for, not built): shift trades with monthly/quarterly limits (a MaxCountInPeriod rule type, a trade request workflow, and counters on My Schedule), and notifications/alerts (an outbox of email/SMS for schedule posted, shift changed, overtime offered, approaching overtime). The data model and rules engine leave room for both.
docs/process/ai-dev-log.md as we go, including AI suggestions we corrected or rejected.docker compose up. No paid services or licences needed.| Length | Block | Times |
|---|---|---|
| 8 h | Days / Evenings / Nights | 07:00–15:00 · 15:00–23:00 · 23:00–07:00 |
| 12 h | Overnight-morning / Afternoon-evening | 00:00–12:00 · 12:00–24:00 |
| 16 h | Long shift (regular, where the unit allows it). Retired as a template (ADR-029). | 20:00–12:00 (next day) |
This is tight for the Must list. If we slip, the Should items go first.
| Day | Work | Output |
|---|---|---|
| 1 | Finalize docs; scaffold three containers; DB schema and seed data | docker compose up shows an empty app |
| 2 | Rules engine and unit tests; rules config API | Engine passing its boundary tests |
| 3 | Planning board and My Schedule; assigning shifts with rule checks | Core loop working |
| 4 | Overtime workflow; employee shift planner | F5, F9 |
| 5 | Time and attendance, payroll export, reports | F7–F8 |
| 6 | Rules admin UI, wall display, polish; build record and README | Submission docs |
| 7 | Verification pass, demo script, ≤5-minute recording | Submission package |
| Required by assessment | Where |
|---|---|
| Prototype, source, setup | Repo, docker-compose.yml, README.md |
| ≤5-minute demo | docs/demo-script.md |
| Build record (≤2 pages) | BUILD_RECORD.md, drawn from these docs |
| Architecture diagram | docs/03-architecture.md |
| Design decisions | docs/decisions.md |
| AI-assisted development | docs/process/ai-dev-log.md |
| 2–5 test cases | docs/02-requirements.md §6, plus automated tests |
A post is a specific position that must have someone in it on every shift, no matter who that person is. Typical examples: a living unit (e.g. “Unit A, 2 officers”), the control room, admissions/intake, escort and transport, and perimeter or yard. Supervisors usually staff to posts: “Unit B nights needs 3, and one of them must be control-room trained.”
Posts matter to the prototype because they’re what coverage (required vs. scheduled vs. actual) and qualification checks (R-03, R-04) are measured against. The prototype can model coverage at any of three levels:
| Level | How coverage is defined | Trade-off |
|---|---|---|
| A. Headcount per shift | “Days need 26 officers, nights need 18” | Simplest; no qualification checks by location |
| B. By unit / area | “Unit A needs 4 on days, 3 on nights” | Middle ground; realistic without too much detail |
| C. By named post | “Unit A Floor Officer ×2, Unit A Control ×1” | Most realistic; most configuration |
Proposed default: B (by unit/area), with about 8 fictional units and a qualification requirement on a few (e.g. Control, Escort). It’s easy to roll up to A or extend to C later. Confirm with real-world practice; we won’t use any real unit names or staffing numbers.
| Item | Value |
|---|---|
| Facility | “Prairie Provincial Correctional Centre” (fictional) |
| Officers | 100, fictional names, mixed qualifications (control-room, escort/transport, first aid), mock seniority dates |
| Window | 90 days: 1 October – 29 December 2026 (one quarter). Days before “today” have actuals; later days are planned only. “Today” can be configured for the demo. |
| Rotations | About 60 officers on 12-hour rotations (2 × 00:00–12:00, 2 × 12:00–24:00, 4 off), 30 on 8-hour rotations (days / evenings / nights) and 10 on 16-hour shifts (20:00–12:00, 1 on, 2 off). Overtime comes from total hours in the pay period, not from shift length. |
| Absences | About 4% of shifts (2% sick, 2% vacation; was 8%, see ADR-020) become absences in the past portion, which creates the gaps that overtime fills |
| Coverage sizing | Required staffing is set slightly above what 100 officers can cover once absences are counted, so overtime appears naturally (roughly 24 officers on at any given hour, against ~23 available on average) |
| Planted cases | A few deliberate edge cases for the demo and tests: a short-rest violation, an exactly-8-hour boundary, a 17-hour emergency override, and an officer running long on consecutive nights |
| Reproducibility | The generator uses a fixed random seed, so every docker compose up produces the same data, and tests can rely on it |