N NoBullshit.wiki 中文

Gym scheduling supervisor - trainer-scheduling peak-coverage calculator, single-file tool - peak coverage computes gaps on the two dimensions of time-slot x class-type, because what the 6-to-8-pm peak lacks is not trainer headcount but trainers who can coach strength; same-trainer same-slot clashes between group classes and PT sessions surface on the spot, the most common silent error in any schedule; the three red lines - daily session cap per trainer, consecutive-session cap, evening-to-next-morning interval - are all self-filled by each club with no defaults; the tool computes, it never schedules - the gap matrix and the swap sandbox exist for human decisions

Works with:Claude / GPT-4 classCategories:GymLevel:Advanced Updated

You are a coding agent building an internal tool for a gym.
Build a single-file HTML tool (HTML, CSS, and JS fully
inlined, no external dependencies, no network requests,
opens by double-click) that computes trainer-scheduling
peak-coverage gaps for the scheduling supervisor. Core
stance: scheduling cannot be reckoned on averages - a
trainer averaging six sessions a day may carry four of
them between 6 and 8 pm; the true dimensions of a
coverage gap are "time-slot x class-type," not trainer
headcount.

Input area (all manual entry, save and export):
A. PT booking distribution: day-of-week x time-slot
   matrix (slot granularity [30] minutes, adjustable),
   each cell holding the booked PT sessions for that
   slot
B. Group-class schedule: each class - name / class type
   (strength / cardio / mind-body / dance, types
   user-defined) / day and slot / coaching trainer
C. Trainer roster: name / certifiable class types
   (multi-select) / available slots (day x slot
   checkboxes) / status (full-time / part-time;
   part-time carries a weekly session cap)
D. Red-line parameters (club-filled, all with no
   defaults):
   - Single-trainer daily total session cap (PT + group
     combined)
   - Single-trainer consecutive-session cap (no rest
     block in between counts as consecutive)
   - Minimum interval hours between an evening shift
     ending after [ ] and a next-morning shift starting
     before [ ]

Computation and output area:
1. Gap matrix: for each day-x-slot cell, "required
   sessions / coverable sessions / gap," split by class
   type - the 6-to-8 pm cell reads "strength-type short
   [2] trainers," not "short on trainers"; the count of
   trainers certifiable for that type and the count
   actually on shift display side by side
2. Clash list: the same trainer scheduled for a group
   class and a PT session in the same slot, listed item
   by item - the most common silent error in a schedule;
   nobody sees it until nobody is standing there
3. Red-line violations: each trainer checked against the
   D-area parameters; violations flagged red with which
   line and by how much
4. Trainer load table: weekly total sessions per person /
   group-vs-PT split / longest consecutive run /
   latest-to-earliest interval - whether the schedule is
   fair reads off this table at a glance
5. Swap sandbox: manually move one session (pick trainer
   / change slot) and all four tables above recompute
   live - making "which line does this swap break"
   visible before the swap

Hard requirements:
- No external CDN, fonts, or icons; no network requests;
  data never leaves the machine; the archive (schedule
  and roster) exports and imports as a whole
- Any input change recomputes live; no "calculate"
  button
- [HARD GATE] The tool does not auto-schedule and outputs
  no "optimal plan" - it computes three things (gaps,
  clashes, red lines); the scheduling decision belongs to
  a human. When an auto-generated plan fails, whose fault
  it is cannot be said

Prohibitions:
- No default values for the red-line parameters - clubs
  differ in trainer contract structure, commutes, and
  class density; a pre-filled number installs another
  club's discipline into this one
- No built-in "common group-class templates" - the
  schedule is decided by this club's trainer credentials
  and member structure
- No "smart trainer recommendation" feature - a
  recommendation is a decision; the tool only lays out
  the options and their costs

Why it is written this way

The two-dimensional gap (slot x class type) is the tool's first design decision. Compute coverage by trainer headcount, and an evening-peak shortage concludes "hire one more trainer"; split by class type, and what's missing is often "trainers who can coach strength" - no number of cardio-certified coaches fills that gap, and hiring the wrong profile is the classic route by which a scheduling problem becomes a headcount problem. Every matrix cell showing "trainers certifiable for this type" next to "trainers on shift" exposes that mismatch at the numeric layer.

The clash list stands alone because it is the schedule's archetypal silent error: the sheet books one trainer's group class and PT session into the same slot, nothing looks wrong on paper, and the error takes until that evening - the member arrives, the trainer cannot be in two rooms - to become visible. Auditing it by hand is expensive (cross-checking two tables per person); by machine it is one loop. Keeping it permanently in the output area auto-checks every revision.

The three red lines (daily cap, consecutive cap, overnight interval) come with no pre-filled values, continuing this tool series' standing discipline: clubs differ wildly in trainer contract structure, commute reality, and class density, and any default installs another club's rhythm into this one's schedule. The cost of the blanks is a dozen numbers at first use; the return is every red line actually belonging to this club - where a parameter comes from matters more than the parameter.

"No auto-scheduling" is written as a hard gate. The auto-scheduler is the most seductive and most dangerous feature: once its plan produces a problem (member complaints, an overworked trainer), responsibility between "the system scheduled it" and "a human approved it" becomes unsayable, and nothing can be either assigned or improved. The tool narrows to three verifiable computations - gaps, clashes, red lines - plus the swap sandbox, which moves the cost of each swap ahead of the decision; scheduling authority stays in the supervisor's hands while the tool makes every exercise of it show its consequences in advance.

Variables

Variable Description
Slot granularity 30 minutes is the common denominator of PT sessions and group classes; clubs with mixed lengths (45-minute classes + 60-minute PT) take 15 - a denser matrix beats an unalignable one
Consecutive-run rule The rest block that breaks a run should start at 30 minutes - a 15-minute gap is enough to change rooms, not enough to recover, and does not count
Part-time weekly cap Copy from the contract, not from memory; a part-timer whose contract states no cap gets the contract amended before the roster entry
When PT bookings are entered Confirmed bookings only, no provisional holds; provisional sessions in the matrix inflate the gap and induce over-scheduling

scheduling-toolpeak-coveragesingle-file-tool