ShiftCircle

ShiftCircle build record

What it is: a working prototype (submitted as release v1.3) that schedules 8- and 12-hour shifts at a fictional 24/7 correctional centre. Supervisors plan against editable Drools tables and work their own posts; officers propose extra shifts; a quarter planner builds 14 weeks with the same engine; worked time feeds a simulated payroll export. All data is synthetic, not an official Government of Saskatchewan service.

1. Architecture

ShiftCircle architecture: browser to web (nginx, React) to api (Spring Boot with the Drools rules engine) to PostgreSQL, in Docker Compose; identity and payroll are simulated external services

A change, draft edit or proposal approval is previewed, then saved, refused with plain reasons, or acknowledged (shift changes may also be overridden), and audited (ADR-014, 026, 032).

2. Key decisions

3. AI-assisted development

Who. Claude Opus 5.5 designed it. From 20 Nov an OpenRig team built and verified it (DeepSeek V4.1 Flash builders, GLM 5.3 verifiers, Claude Sonnet 5.5 security and lead; different families except R32 to R34 and releases 3 to 7). For v1.2 and v1.3, Claude agents built one gated pull request per change.

Caught by verification after the authors’ tests passed:

Defect Caught by
Remote code execution through a rule edit (unescaped source); fixed in three layers reviewer payload (R24, R28)
Concurrent saves passed a Block; now a per-officer lock reviews (R13, R16, R40, R42)
The dry run ignored post-rule edits; an approver saw no impact v1.3 UI test (S2)

Rejected: a custom rule catalogue, 16 h shifts as overtime-only, a catch-all handler that hid 403s as 500s.

4. Test cases and verified status

ID Case Expected Result
T2 12 h shift, then an 8 h shift after 7 h rest BLOCK (U-01, U-05, U-08, U-14), nothing saved 422, no override
T3 Night ends 07:00, next shift 15:00 (exactly 8 h) U-01 passes, U-02 warns, saves once acknowledged pinned by tests
T8 Payroll export, locked period equals the golden file byte-identical
T9 17 h cover in a lockdown Block; with a written reason it saves, audited pinned

Gate for v1.3 (main d3d1d28, 25 Nov 2026): API 624 tests, web 695, Playwright desktop 144 passed, tablet 143 passed and 1 skipped, 0 failed.

5. Governance and ministry suitability

6. Next steps (pilot)

  1. Restore human review: a practitioner reviews the rule tests and the MOCK values.
  2. Government SSO; a payroll-clerk role; insert-only audit roles (ADR-018); TLS, CI scanning (docs/08 §9).
  3. Ownership and support: the facility’s scheduling office owns the service; a rules administrator owns the rule tables, with labour relations approving changes (maker/checker); ministry IT application support runs it, with the build team on call for fixes during the pilot.