Inventory count specialist at a neighborhood fresh-food store - the shelf-life count tool that turns one pass over the batches into four lists: sell today, mark down tomorrow, return to vendor, write off
You are a coding agent building a single-file tool for a neighborhood
fresh-food store. Build an HTML single file that opens straight in a
browser: a Shelf-Life Count List Generator, used by the inventory
count specialist during expiry counts. All computation runs locally;
no external requests of any kind.
Data entry:
- Row-by-row entry and paste-from-spreadsheet: item / expiry or
production date (either) / shelf-life days / quantity / shelf
location / vendor-returnable (yes/no)
- No-code mode: for fresh items without date printing, allow entering
only the receiving date and estimate expiry via the item's
[expected turnover days] from the settings area. Estimated rows
must carry a visible "est." mark, visually distinct from rows with
read dates
Tiering rules (four lists; every threshold lives in the settings
area and takes effect only after the user sets it):
1. Sell-today list: remaining sellable days at or under [today
line, default 1]
2. Markdown warning list: remaining at or under [markdown line,
default 3], with a suggested markdown tier attached
3. Vendor return list: vendor-returnable AND remaining at or under
[return line] - vendor policies differ wildly, so this line must
be filled in by the store itself
4. Write-off list: already expired, or manually flagged "condemned
on sight"
Output requirements:
- Four lists as separate printable tables: item / quantity / shelf
location / suggested action, headers carrying the generation date
and the counter's name
- One summary line: N items at X value sell-today, N markdown, N
return, N write-offs at X value - that one line is what the owner
sees
- Rows whose dates fail to parse go to a red "error rows" section:
excluded from totals, never silently dropped
Hard constraints:
- Ship zero "industry default shelf-life tables" and zero default
tiering values - every threshold is maintained by the user in
settings, and first use must force a settings pass before any
output
- No "auto-reorder suggestions," no "shrink analytics" - outside
this tool's boundary; bolting them on only dilutes the main job
- No backend, no uploads, no persistent storage beyond the page
session; closing the tab clears everything (an export-to-CSV
button is the escape hatch)
Why it is written this way
Most small stores run the expiry count inside the quantity count: whoever counts stock glances at labels in passing. Which means items get handled "when seen" - and "seen" usually arrives below the markdown line. Splitting the shelf-life count out and ending it in four action lists buys lead time: today's must-sells move to the entry display, tomorrow's markdowns get announced today. That one day of difference is the whole gap between sold and binned.
The no-code mode is fresh-produce reality: leafy greens and loose fruit carry no date print, and if the form demands a date, staff will invent one - and once the data is fabricated, the tool is dead. Estimating from the receiving date plus an agreed turnover window, and stamping every such row "est.," tells whoever reads the list how much to trust each line. An honest estimate beats a precise invention.
"No default shelf-life table" is the single most important constraint here. The standard move for a coding agent is to ship a handy "common fresh-food shelf-life reference" - and it is the start of a disaster: nobody edits defaults, defaults quietly become "our standard," and nobody can say where they came from. Forcing manual threshold maintenance forces the store to settle how long its goods actually last - and that settling act is where the real value of the tool lives.
Four lists instead of one master table, because lists must land on people: the sell-today list goes to the floor, the markdown list to the fresh-food supervisor, the return list to the vendor, the write-off list to the ledger. A master table gets read by everyone and acted on by no one; four lists each have an owner, so they get picked up.
Variables
This prompt has no blanks to fill in; the [today line], [markdown line], [return line], and per-item turnover days are maintained by the user inside the tool's settings area.