Community supermarket inventory count specialist - count team assignment tool with segregation rules: who counts which zone in one click - nobody counts their own department, every pair carries a veteran, scale zones go to veterans only, workloads balance, and one absence triggers a one-click reshuffle
You are a coding agent. Build a single-file HTML
"Count Team Assignment Tool" for a community
supermarket count specialist to allocate count
zones before count night. Runs locally, no
network, no external dependencies.
Positioning (design to this; do not build
scheduling software): count assignment fails in
two predictable ways - clerks counting their
own department (the hand copies the book column
from memory, and the count never happened), and
workload imbalance (someone finishes in an hour
while someone counts past midnight). This tool
solves exactly "who counts which zone" under
segregation and balance rules, one click, with
printable task cards. It does not record count
data and does not analyze variances - those
belong after the count.
Two inputs:
1. People table (entered the day before)
- Name / home department / skill level (veteran
or rookie - two prior counts makes a veteran,
ticked by the person entering data)
2. Zone table (entered once, reused with tweaks)
- Zone name / department / estimated workload
in minutes (from the last count's actuals;
editable defaults where absent) / special
requirement ("requires scale" is the only
preset requirement)
Assignment rules (frozen into the algorithm and
shown on the interface):
1. Segregation: nobody is assigned to a zone in
their own home department
2. Veteran pairing: every team carries at least
one veteran
3. Scale zones (fresh): veterans only - weighed
count error is mostly people who cannot
operate the scale
4. Balance: total workload across teams stays
within [balance tolerance] minutes
5. Rule priority on conflict: segregation >
scale-zone veterans > veteran pairing >
balance - imbalance is accepted before
segregation is broken
6. When no assignment satisfies the rules, the
tool reports "no solution: short N people
meeting [rule]" and names the blocking rule.
It never quietly ships a plan that breaks a
rule to pretend it worked
Output:
- Assignment table: team / members / zones /
total workload / any priority demotions (which
rule yielded)
- One printable task card per team (black-and-
white legible): members / zones / per-zone
estimated minutes / sheet drop-off at
[drop-off point] / deadline [deadline] /
reviewer signature line
- One-click reshuffle: edit the roster (someone
calls in sick, a zone added or cut) and
regenerate, with a diff against the previous
plan showing which teams changed
Hard constraints:
- People and zone data in localStorage, with
JSON export/import - survives changing
machines and next quarter's count
- Every rule and every demotion displays on the
results page - "why does this team have no
veteran" must answer itself (e.g. "rookies are
7 of 9; veteran pairing yielded per priority")
- Preloaded example data (8 people, 6 zones,
one scale zone, and one deliberately
understaffed no-solution scenario) so the
assignment output and the no-solution report
both render on first open
- No network, no accounts, no external
libraries
You may not:
- Record or total count data - the moment an
assignment tool touches counts, a second
book of record appears
- Do "intelligent optimization" scoring - the
rules are the five above, satisfied by
priority, not weighted and blended
- Do scheduling or time-and-attendance
Why it is written this way
Segregation outranking balance in the priority stack is the tool's value ordering: letting clerks count their own department is not primarily a fraud risk, it is a subconscious one - a person who knows their planogram by heart finds quoting the book number easier than actually counting, so the count never physically happens and every downstream variance loses its baseline. Better unbalanced than segregated-out: that priority must be frozen in the algorithm, not posted as advice, because only frozen rules have no "just this once" loophole.
"Scale zones staffed by veterans only" is its own rule because the skill floor of weighed counting is chronically underestimated: taring, waiting for the scale to settle, frost melt on frozen goods - a rookie injects error at every step, and fresh is precisely the department where variance matters most. The task card carries a reviewer signature line to hook into the post-count sheet audit: whose sheet, who reviewed - readable off the card, no archaeology when a variance needs a face.
The "report no solution" behavior is the tool's most contrarian feature: most scheduling tools quietly relax constraints when staffing falls short and emit a plausible-looking plan with the violations invisible - and an assignment tool that quietly breaks segregation voids the whole count's credibility. The no-solution report names the blocking rule, which hands the specialist an executable conclusion ("borrow one person from outside the tobacco-alcohol department") instead of a finished-looking, worthless plan. Preloading a no-solution scenario means the first person to open the tool has already seen that report once, and does not panic when it appears for real.
Variables
| Variable | Description |
|---|---|
| Balance tolerance | How many minutes of workload may separate teams - a minute figure reads more directly than a percentage; set it by how coarse the zone estimates are |
| Drop-off point / deadline | Where and by when sheets land, printed on every task card - printed beats announced, every count night |
| Estimated workload | Each zone's actual minutes from the last count - defaults for the first run, backfilled with real times each count, converging on useful estimates |