N NoBullshit.wiki 中文

Community group buying warehouse manager - staple-SKU reorder point and buy-round cadence calculator, single file - staple consumption is not a smooth daily average, it is a pulse: it follows the buy calendar, rice gets consumed only in rounds where rice is listed, and on no-round days consumption is near zero; generic reorder-point tools built on 'average daily usage' inevitably fail here - switch the calendar from two rounds a week to three, or shift a seasonal window, and the average line always misses the first pulse; the tool's only engine is the buy calendar: per-item estimated outbound per round x the schedule of coming rounds unfolds a pulse series, lead time is back-calculated into an arrival date, and every staple SKU gets a suggested order day and quantity; the stockout cost is asymmetric - a staple that runs out is not 'sold tomorrow', it is a whole buy round dark, so the reorder point is 'the pulses falling inside the lead time + safety allowance'; three cap checks turn red: arrival later than the next round's dock cutoff, quantity beyond what shelf life can absorb, quantity beyond bin capacity - and if no sound order fits, the tool says so in red rather than fudging; items whose supplier lead time exceeds the round interval get an automatic 'switch to fixed-cycle ordering' flag; every formula shown on the page, no black box, parameters all blank, no margin math, no ordering - the tool calculates, the human orders

Works with:Claude / GPT-4 classCategories:Community Group BuyingLevel:Advanced Updated

You are a coding agent. Build a single-file HTML "group buying
staple-SKU reorder point calculator" for grid warehouse managers
to compute suggested order days and quantities for staple SKUs
(rice, flour, oil, household goods, frozen - the items that run
every round). Runs locally, offline, no external dependencies.

Positioning (design to this; do not build a generic inventory
manager): staple consumption in group buying is not a smooth
daily average - it is a pulse that follows the buy calendar: rice
moves only in rounds where rice is listed, and on no-round days
consumption is near zero. Reorder tools built on "average daily
usage" inevitably fail here: switch the calendar from two rounds
a week to three, or shift a seasonal window, and the average line
misses the first pulse. This tool has exactly one engine: the
buy calendar.

Three entry blocks:
One, the staple list: item name, unit, current stock, shelf life
   (fill if any), bin-load factor
Two, calendar and consumption: the coming rounds' go-live dates,
   each item's estimated outbound per round (last round's actuals
   or operations' estimate; may be blank)
Three, parameters (all left blank [ ] for me to configure;
nothing prefilled):
   - Supplier lead time (per item or per supplier)
   - Safety allowance (a percentage or absolute quantity covering
     forecast error)
   - Bin capacity cap (total or by zone)
   - Shelf-life safety days

Calculation logic (formulas shown on the page; no black box):
- Unfold each item's consumption pulse series from the calendar
- Reorder point = the pulses falling inside the "order-to-arrival"
  window + safety allowance; the arrival date must fall before the
  dock cutoff of the next round the item runs in
- Suggested quantity = the pulses through the next sensible
  replenishment date, subject to three caps

Three cap checks (any trigger flags red; silently trimming the
quantity to pass a check is forbidden):
1. Arrival-date check: the back-calculated arrival (by lead time)
   falls after the next round's dock cutoff - red-flag the item
   and its latest order day
2. Shelf-life cap: current stock + suggested quantity > the
   expected consumption before the expiry date plus the safety
   days' consumption - red-flag the excess (stocking past shelf
   life is a certain loss; a stockout only misses one round - the
   costs are asymmetric)
3. Bin-capacity cap: combined bin-load over the cap - red-flag
   the shortfall
Special flag: items whose supplier lead time exceeds the round
interval get an automatic "switch to fixed-cycle ordering" tag -
reorder-on-trigger logic can never catch up for those, and
ordering a fixed amount every round is the only way out; the tool
flags it but never changes my ordering method for me.

Outputs:
- The staple order-suggestion table: item / current stock /
  suggested order day / suggested quantity / caps triggered, each
  row with the worked formula (which rounds' pulses it covers,
  what allowance was added)
- The red list: which cap was violated, which item, the minimal
  fix (example: "ordering two days earlier avoids the arrival
  conflict")
- One-click copy of the order suggestions as plain text,
  paste-ready for purchasing

Implementation requirements:
- Single HTML file, inline CSS and JS, opens on double click, no
  network requests
- No data written to disk; refresh clears everything. Ship one
  example dataset (about 10 staple SKUs, including one item whose
  lead time exceeds the round interval and one tripping the
  shelf-life cap) so the red flags show the moment it opens
- No inventory-system API of any kind - manual entry is part of
  this tool, not a defect

You must not:
- Build auto-ordering or "one-click send purchase order" - the
  tool calculates, the human orders; the accountability chain
  stays with the person
- Compute margins or rank items by "worth stocking" - what to
  stock is operations' and purchasing's call; this tool governs
  the rhythm of already-chosen items only
- Silently loosen any cap; if no sound quantity fits, the red
  text says the order cannot be placed
- Prefill any rules-of-thumb parameters - lead times, allowances,
  and capacity differ wildly operation to operation

Why it is written this way

The pulse is the entire thesis of this tool. Generic reorder-point tools assume "average daily usage", multiply by lead time, add safety days - sound for retail that sells every day, unsound for group buying: staples consume in pulses that follow the buy calendar, rice moving only in rounds where rice is listed, near-zero consumption between rounds. Worse, the calendar is alive: two rounds a week becomes three, pre-holiday rounds stack up, seasonal windows shift - the daily average line is always one beat behind, and the first pulse punches straight through the stock. So the tool's only engine is the buy calendar: pulses unfold from the schedule, never from a smoothed historical average. This is not an implementation preference; it is the crux of the problem.

The asymmetry between stockout and overstock costs is the design origin of the three caps. A staple that runs out cannot "sell tomorrow" - it waits for the next round, and what is lost is an entire round's sales; but in the other direction, over-stocking a shelf-life item is a certain loss, money turning into write-offs. So the reorder point leans large (all pulses inside the lead time plus a safety allowance, erring generous), and the three caps pull back from three directions: the arrival date caps the rhythm, shelf life caps the hoarding, bin capacity caps the space. Red flags report but never trim - silently cutting the quantity to pass a check is the tool making a compromise nobody knows about, and the manager walks away holding a "all checks green" suggestion that is not safe at all.

Showing the worked formula is about the credit of an order suggestion. The manager carries this table to purchasing to reconcile and to operations to argue; "the tool computed it" is not a reason - the unfolded formula is: which three rounds' pulses this order covers, what allowance was added, how far from the cap. Every row can be taken apart and checked. A black-box quantity nobody dares sign is also nobody's to review - one deviation and the whole tool gets abandoned. "Manual entry is part of the tool, not a defect" follows the same logic: fifteen or twenty staples, five minutes of typing, buys a table where every cell has been checked by a human - rather than an account silently synced from an inventory system that nobody ever looks at.

Items whose lead time exceeds the round interval get their own "switch to fixed-cycle ordering" flag because reorder-point logic fails for them structurally: wait for consumption to hit the trigger, and the arrival always lands after the next round - uncatchable by design. The only way out for such items is a fixed order every round - and flagging that transition is what a tool can do; changing the user's ordering habits is not. "The tool calculates, the human orders" is the same accountability chain as the site's scheduling tool - "a human schedules, the tool checks": numbers may be automatic, signatures stay human.

Variables

Variable Description
Safety allowance basis The allowance covering forecast error - pick percentage or absolute, set by how reliable each item's per-round outbound estimate is; operations' estimates deserve a bigger allowance than last round's actuals
Shelf-life safety days The days reserved for variation inside the shelf-life cap - how many days before expiry "won't sell out" starts counting; set by the category's turnover and markdown channel
Dock cutoff definition What "arrival before the round" means - the truck-arrival time or the sorting start time; fix one definition and keep it consistent across the table

reorder-pointbuy-round-cadencesingle-file-tool