Complete reference for defining schedules in plain English
How to use the DSL: Mix and match policies, employees, and rules in any order. Each line is parsed independently. Lines starting with # are comments.
Use pre-built policy bundles by typing "Use policy:" followed by the exact policy name.
Use policy: Basic Labor Laws
← Applies basic labor regulations
Use policy: Healthcare Basic
← Nurse-to-patient ratios, shift limits
Use policy: Trucking Hours of Service (HOS)
← Federal HOS rules
Define additional employees beyond the demo dataset. ⚠️ Role is REQUIRED!
Employee Martin Gagne, role: Nurse
Employee Sarah Johnson, role: Nurse, seniority: 3 years
Add employee Mike Chen as Doctor with 8 years experience
Alice Williams as Driver
Bob Smith, Driver, certifications: CDL Class A
Employee Martin Gagne
← Missing role!
Martin Gagne, 3 years
← Missing role!
seniority: [N] years - Years of experienceskills: [skill1], [skill2] - Comma-separated skillscertifications: [cert1], [cert2] - Certifications like CDL, CPR, BLSmax hours: [N] per week - Maximum hours per weekEmployees are matched to shifts based on their skills, not their role name. If a shift requires skills like "RN" or "CPR", employees must have those skills explicitly listed.
Example:
Without skills, the employee will be rejected from all shifts that require specific skills. Check the Employee Summaries and Shift-by-Shift Decision Trail after running the schedule to see why employees were selected or rejected.
Define constraints in plain English. Hard rules MUST be met. Soft rules are preferences (0-100 priority).
Hard: At least 11 hours rest between shifts.Hard: No employee works more than 6 consecutive days.Hard: After a night shift, at least 12 hours before next shift.Hard: No employee works more than 60 hours per week.Hard: No employee works more than 12 hours per day.Hard: At least 2 days off every 14 days.Hard: No more than 2 weekends in any 30-day window.Hard: Maximum 11 hours of driving per day.Hard: Maximum 14 hours on-duty per day.Hard: At least 10 hours rest after 11 hours of driving.Hard: Maximum 60 hours of driving per 7-day period.Hard: No more than 2 on-call shifts per 7 days.Hard: Maximum patient ratio of 6:1 (patients per nurse).Soft (priority 80): Balance weekend shifts evenly across the team.
Soft (priority 50): Minimize split shifts on the same day.
Soft (priority 70): Senior employees get first choice on weekends.
💡 Important: Only the patterns shown above are supported. Custom rules that don't match these patterns will be rejected during validation.
| ❌ Wrong | ✅ Correct |
Employee Martin |
Employee Martin Gagne, role: Nurse |
Policy: Healthcare |
Use policy: Healthcare Basic |
Soft: Balance weekends |
Soft (priority 70): Balance weekend shifts evenly. |
Hard: Max 3 hours |
Hard: No employee works more than 3 hours per day. |