N NoBullshit.wiki 中文

Workshop manager: rush-order three-channel cost tool, single file - overtime (with efficiency derating and a feasibility gate) / outsourcing (unit price plus freight plus incoming inspection) / negotiating a delay (liquidated damages entered by contract tier) side by side; predicts nothing about the customer and picks nothing for you

Works with:Claude / GPT-4 classCategories:Factory WorkshopLevel:Advanced Updated

You are a coding agent. Build a single-file HTML "rush-order
three-channel cost tool" for a manufacturing workshop manager:
when a delivery date is at risk, lay out the total cost of each
of the three paths - overtime, outsourcing, negotiating a delay
- side by side. Runs locally, no network, no external
dependencies.

Context (design to this): in rush meetings, overtime cost gets
estimated as rate x hours and capacity as if it were a normal
shift - optimistic on both ends, because overtime hours run at
derated efficiency; the outsourcing quote gets compared against
internal shop rate while freight, incoming inspection, and the
material shipped out are all off-book; liquidated damages get
remembered as one cap, and nobody opens the tiered clause. The
tool answers exactly one question: for each channel - can it
finish on time, and what does finishing on time cost?

Inputs:
- Remaining order quantity, production days left, shifts per
  day and output per shift
- Overtime channel: overtime rate (per company policy), daily
  overtime-hour cap, efficiency derating factor (output during
  overtime / output during normal hours - the user fills this
  from their own shop's measured data; the tool pre-fills no
  rule-of-thumb), additional overtime cost items (night shift
  allowance / meals / transport, may be empty)
- Outsourcing channel: unit price, round-trip freight,
  incoming inspection cost, cost of material shipped to the
  subcontractor (counted as full loss if not recoverable)
- Delay channel: liquidated-damages clause entered by tier
  (within N days X%, beyond N days Y%, cap Z% - any number of
  tiers), order value
- Shared: material cost per unit, defect rate (enterable per
  channel)

Output four things:
1. Feasibility first: the overtime channel computes total
   achievable output on derated capacity; if that cannot reach
   the remaining quantity, the whole channel is flagged
   "overtime channel unreachable," grayed out, cost column
   reads "meaningless" - never back-compute a fake feasible
   number on normal-shift efficiency
2. Three-channel side-by-side table: per channel - achievable
   quantity / on time or not / total cost / cost breakdown
   down to the entered line items
3. Hybrid-channel line: combination cost of overtime to its
   cap plus outsourcing for the gap, computed automatically -
   reality usually runs this path, but it only exists when
   both component channels are themselves feasible
4. Sensitivity: does the cost ranking of the three channels
   flip when the derating factor moves +/-0.1 or the
   outsourcing price moves +/-[ ]% - the flip point deserves
   the meeting's attention more than the cost gap itself

Hard constraints:
- Derating factor, damage percentages, every rate: user-entered
  only; the interface never shows a pre-filled number or an
  "industry typical" hint
- Damages auto-match the entered delay day count to the tier;
  the formula is printed on the page
- Data in localStorage, exportable/importable as JSON
- One preloaded example (self-made quantities, rates, flagged
  "sample data") so all four outputs are visible on open
- Printable; nothing lost in black-and-white

You must not:
- Predict whether the customer accepts a delay or monetize
  "goodwill loss" - the delay channel's notes list "customer
  relationship, future orders" as unquantified items, with no
  number attached
- Recommend an "optimal channel," score, or rank - three
  ledgers laid out, the choice stays with the human
- Pull external data or optimize across multiple orders -
  one order is the tool's boundary

Why it is written this way

Putting the feasibility gate ahead of the cost math is this tool's most important decision. Overtime always looks cheapest in the meeting because it silently assumes normal-shift efficiency for capacity and rate-times-hours for cost - once derating enters the formula, plenty of "just push some overtime" plans fail the gate outright: derated capacity across the remaining days never reaches the remaining quantity. An unreachable channel with a pretty cost number attached is the most dangerous output a tool can produce, because someone will take that number to the decision. So the unreachable channel grays out entirely, its cost column reads "meaningless," and the discussion is forced toward "what combination" instead of "how cheap overtime looks."

The derating factor refuses pre-filled values because it varies enormously by shop - physically punishing operations derate hard, automated machining segments barely at all, and any "industry typical 0.7" will get quoted as gospel. Leaving the field blank and demanding measured data makes the right first response "go measure it," not "guess." Tiered damages work the same way: the tiers sit unread in a contract annex; forcing the user to transcribe them makes the act of entry a re-read of the contract.

The hybrid line exists because reality's answer is almost never one of three: overtime to its cap, outsourcing the gap, and negotiating one damages tier for the remainder. But the line has two preconditions - both component channels feasible; missing one, it is a castle in the air. The sensitivity output is a flip point, not a cost gap: if overtime overtakes outsourcing when the derating factor slides from 0.8 to 0.7, the whole decision hangs on an unmeasured coefficient - measuring the coefficient is cheaper than making the wrong call.

No recommendation, no goodwill monetization - that is the tool's boundary discipline. The least computable entry in the three ledgers is the customer relationship; the moment a tool prices "delay trust cost," users believe the number. Name it, never number it, and let the humans at the meeting weigh that part - which is exactly where a tool should stop.

Variables

Variable Description
Efficiency derating factor Overtime output vs normal output - measure from your own shop's recent overtime shifts, do not guess
Contract damages tiers Transcribed from the contract, each tier's percentage and cap - confirm the trigger counts days or weeks while transcribing
Outsourcing full-cost items Which items exist beyond unit price (freight / incoming inspection / material loss) - every unlisted item under-prices the outsourcing channel

single-file-toolrush-decisiondelivery-date