N NoBullshit.wiki 中文

Coffee trainer - rush-hour drink-sequencing drill tool - random ticket sets, trainee builds the build order, tool scores it against the shop's rules

Works with:Claude / GPT-4 classCategories:Coffee ShopLevel:Advanced Updated

Please build me a single-file HTML rush-hour drink-sequencing
drill tool for a coffee shop. It opens straight in the
browser, no network, no dependencies.

Put this background in the tool's intro: the new barista's
bottleneck isn't making a drink, it's sequencing under
load - three tickets, one espresso machine, one brew bar,
and the order of operations decides the gap in serve pace.
The tool deals tickets, the trainee sequences, the tool
simulates the outcome.

Core loop:
1. "Deal tickets": randomly generate [2-4] tickets
   totalling [6-12] drinks, each tagged by category
   (hot espresso / iced espresso / pour-over /
   pre-batched cold brew / hot tea) with the parameters
   from the rules panel
2. The trainee drags drinks into a "build sequence" and
   may group them (a group runs as one continuous action,
   e.g. two same drinks pulled as one shot cycle)
3. "Simulate": the tool steps through time drink by drink
   and outputs - each ticket's completion time, total
   makespan, average wait of earlier tickets, and a list
   of rule violations
4. The tool also computes a reference sequence (a greedy
   simulation is fine) and shows it beside the trainee's,
   with the makespan gap; both can be replayed cup by cup
5. After [5] rounds, a one-page summary: average overrun
   percentage and the most frequent violation type

Rules panel (the scoring basis, all editable):
- Minutes per drink: espresso [3], pour-over [6],
  pre-batched cold brew [1], hot tea [2] - change to
  this shop's measured times
- Parallelism rules: the machine can run [2] drinks at
  once; during a pour-over's drawdown the barista can
  step away to other drinks; pre-batched cold brew is
  open-and-hand-over
- Scoring rules (each violation is named and penalized):
  a. long-wait process (pour-over) not started before
     other steps
  b. same drink on the same ticket not batched into one
     shot cycle
  c. iced-drink bases not staged before hot-drink milk
  d. a later ticket completed while an earlier ticket is
     still open (order inversion)
- Ticket arrival option: an "incoming tickets" mode where
  new tickets land mid-round, forcing re-sequencing
  judgment

Constraints (for the coding agent):
- Every duration and parallelism parameter is an editable
  default, visibly labeled "set to your shop's measured
  times" - never presented as the standard answer
- The reference sequence is one solution the tool's greedy
  pass happens to find; the UI must call it "reference,"
  never "optimal" or "correct" - a trainee may produce a
  different order with the same makespan, which counts as
  a tie, not an error
- Single file, English UI, no accounts, drill history in
  localStorage only, print-friendly

Why it is written this way

The skill this tool drills can otherwise only be practiced on live rush-hour tickets, and the ones paying for every mis-sequencing are customers - each ordering mistake is billed to whoever ends up waiting behind it. A simulator lifts the decision out of operating hours: a mistake in the tool replays its consequences with one click, whereas the same lesson at the bar costs a complaint. The scoring rules all point at real scheduling principles (start the long job first, never idle a parallel slot) rather than the first-come-first-served moral instinct - which is exactly what novices get wrong by default.

Demoting the reference sequence to "reference" and never "the answer" is the tool's most important single design decision: scheduling problems routinely have several orders with identical makespans, and if the tool claims a unique optimum, trainers will treat "reproduce the tool's order" as the pass bar, and trainees learn mimicry instead of judgment. Allowing ties and showing both sequences' step-through side by side keeps the teaching focus on the discussion of "why this order also works."

Durations are editable defaults for the same reason as in the ordering-rhythm tool: three minutes or two for an espresso, whether pour-over occupies the barista - machines and layouts differ hugely per shop. The tool ships sensible starting values so it's drillable on open, but the UI says plainly "set to your shop's measured times" - once the trainer does, the tool simulates this shop's own rush.

Variables

Variable Notes
Minutes per category Measured per-category times; the basis of simulation and scoring
Parallelism parameters Cups the machine runs simultaneously; whether pour-over frees the barista
Ticket volume The random range of tickets and total drinks per round - the difficulty knob
Scoring rules Which of the four sequencing violations are enabled and their weights; editable per shop layout

bar flow trainingsequencing decisionssimulation drill