Fast food restaurant scheduling supervisor - weekly schedule generator tool - when a constraint can't be met the tool must say so; silently emitting a "looks feasible" schedule is forbidden
You are a coding agent building an internal tool for
a fast food restaurant. Build a single-file HTML
tool (HTML, CSS, JS all inline; no external
dependencies, no network requests; opens by double-
click in any browser) that generates the weekly
schedule for the scheduling supervisor.
Input area:
- Staff table: name / skill tags (opening, register,
kitchen, expo, closing; multi-select) / weekly
availability (half-day granularity checkboxes) /
weekly hour cap [hours]
- Needs table: period (half-day granularity) ×
station, how many people each
- Constraint settings (user-adjustable defaults):
· No run of consecutive scheduling beyond [ ]
hours
· At least [ ] hours between two shifts
· Every period includes at least one person with
the "opening" skill (toggleable)
Generation logic (a "How this works" panel on the
page):
- Hard-coded solve priority: skill coverage >
period headcount > personal weekly caps >
doubles-and-spacing preferences - the ordering
may not be re-tuned by the algorithm
- An explainable greedy or backtracking approach is
fine; optimality is not the goal, but every
assignment must be able to answer "why this
person": skill match, most remaining weekly
hours, or fewest shifts already assigned
- Behavior on constraint conflict (the core
requirement of this tool): no constraint may be
silently dropped. On conflict, output the
"nearest feasible" plan and separately list:
which constraint failed, by how much (people
short / hours over / which period lacks an
opener), and suggested relaxations (temp help /
adjust needs / adjust availability)
Output area:
- Week view: rows = staff, columns = periods, cell
= station and times; a footer row auto-totals
headcount and skill coverage per period
- Person view: weekly hours per person, remaining
allowance, double-shift status
- Conflict report: the list of unmet constraints
(red); when there are none it reads "all
constraints met" - never blank
- Print layout: one landscape page, wall-postable
- Change diff: after any manual cell edit, re-check
all constraints and highlight the other cells
affected
Hard requirements:
- No external CDNs, no network requests; data never
leaves the machine
- Support at least [25] staff × [14] periods without
lag
- Export (in a format that pastes into spreadsheet
software) and a clear-all function
- No "smart overtime recommendations" or similar -
the tool serves scheduling and constraint
checking, not staffing decisions
Why it is written this way
"No silent relaxation" is the tool's core clause. The great risk of a scheduling tool isn't failing to produce a schedule - failure sends a human to improvise - it's producing one that quietly violates an hour cap or a skill constraint: it looks feasible, gets posted, and day one opens with someone over hours and a period with no opener. So the correct behavior under conflict is locked in: emit the nearest plan and lay out every unmet constraint, the shortfall, and the way out. A schedule with a declared gap beats a silent one every time.
The priority order is hard-coded because every solver (and every human) must sacrifice something in a conflict, and without an ordering it sacrifices whatever yields easiest - typically skill coverage, the constraint that "looks negotiable". The order is fixed: skill coverage over headcount, headcount over personal caps, caps over doubles-and-spacing. Once the supervisor understands that ordering, they also understand the tool's logic for what got sacrificed.
The "why this person" explainability requirement comes from the same place as the method panel in the prep tool: scheduling touches everyone's money and rest, and "why me" is a standing question. Every assignment must answer with skill match, most remaining hours, or fewest shifts already given - a tool that can't answer that doesn't survive its first week.
The final cut removes "smart overtime suggestions": above the arithmetic sits human judgment, and hour decisions belong to people. The line drawn here is the tool's authority boundary - the first thing an overreaching scheduler "optimizes" away is the staff's trust.
Variables
| Variable | Notes |
|---|---|
| Staff & needs data | Skill tags, availability, weekly caps, per-period station needs - the tool's entire input; half-day granularity is the working balance |
| Constraint defaults | Double-shift cap, minimum spacing, opening-skill enforcement - set per store policy and local rules |
| Team size | Staff × periods - a typical fast food store runs under 25 people × 14 periods, and the tool must not lag inside that range |