{
  "$comment": "One week at a small shop. Days are Mon..Sun (add \"week\": 2 for a fortnight), or use \"date\": \"2026-11-09\" everywhere instead. A shift that ends before it starts runs past midnight. needs maps a skill to how many people with it the shift must have; each person fills one need. \"any\" matches everyone. An assignment can be a plain id, or {\"id\": ..., \"as\": skill} to fix the role. rules left out default to 11 h rest, 6 days in a row and 12 h a day.",
  "rules": { "min_rest_hours": 11, "max_consecutive_days": 6, "max_hours_per_day": 12 },
  "staff": [
    { "id": "amira", "name": "Amira", "skills": ["keyholder", "till"], "max_hours": 40, "contracted_hours": 37.5 },
    { "id": "ben", "name": "Ben", "skills": ["till"], "max_hours": 30, "contracted_hours": 24,
      "unavailable": [ { "day": "Wed", "reason": "college" } ] },
    { "id": "chloe", "name": "Chloe", "skills": ["till", "stock"], "max_hours": 40, "contracted_hours": 30,
      "unavailable": [ { "day": "Sat", "start": "16:00", "end": "23:59", "reason": "childcare" } ] },
    { "id": "dev", "name": "Dev", "skills": ["keyholder", "stock"], "max_hours": 40, "contracted_hours": 37.5 }
  ],
  "shifts": [
    { "id": "mon-early", "day": "Mon", "start": "07:00", "end": "15:00", "needs": { "keyholder": 1, "till": 1 } },
    { "id": "mon-late", "day": "Mon", "start": "14:00", "end": "22:00", "needs": { "keyholder": 1, "till": 1 } },
    { "id": "tue-night", "day": "Tue", "start": "22:00", "end": "06:00", "label": "Tue delivery", "needs": { "stock": 2 } }
  ],
  "assignments": {
    "mon-early": ["amira", "ben"],
    "mon-late": ["dev", { "id": "chloe", "as": "till" }],
    "tue-night": ["chloe", "dev"]
  }
}
