Five steps, every morning
-
Observe
Reads the orders up to the last working day and grades the last plan against what shipped.
read_orders
check_yesterday -
Decide
Scores three forecasting methods on the last 30 working days and picks the one that missed least. If recent days ran above forecast, it staffs for a high day.
compare_forecast_methods -
Act
Forecasts the next five working days, finds the SKUs in demand, plans the boxes to bring down and sets the workers.
forecast_demand
find_skus_in_demand
plan_replenishment
plan_workers -
Check
Checks its own plan: more workers than the roster, demand the racks cannot cover, a sudden spike, idle boxes on levels 1-2.
check_plan -
Report
Writes a short brief for the supervisor and raises anything a person must decide, instead of settling it alone.
brief and escalations
Two brains, the same tools
The built-in rules always run the five steps in order. They planned every day in the replay, so the track record can be checked by anyone.
With an Anthropic API key, Claude runs the morning instead. It chooses which tool to call next, reads each answer and decides what to do with it. It never calculates: every figure comes back from a tool. If its brief contains a number no tool produced, the brief is rejected and the agent writes it from the tools' answers.
How replenishment works
Levels 1-2 should hold enough of each SKU size for the next working days. Where they fall short, the agent brings boxes down from levels 3-4, nearest first: the same bay, then the same aisle, and level 3 before level 4.
A SKU size with no box on levels 1-2 gets a new pick face. Its slots come from boxes that have not sold in 40 working days, which move up to reserve. The list shows each box: where it comes from, where it goes and why.
How the forecast works
Three simple methods compete every morning: the same weekday last week, the average of the last six same weekdays, and the last 20 days' average shaped by weekday. The one that missed least over the last working days makes the forecast.
The likely range comes from how far its forecasts actually missed. Demand is split across SKU sizes by their share of the last 40 working days.
How workers are counted
Each forecast day becomes hours of work: a walk and a setup for each trolley run, a stop for each order line, a few seconds for each pair, and a minute for each box brought down. Hours become workers at productive hours a shift.
A day that needs more than the workers on the roster goes to the supervisor.
Every number it works with
Each value is measured from the records, taken from the original project report, or an assumption. Assumptions can be changed in one file without touching the code.
| Value | Setting | Source |
|---|
The records
What it cannot know
- One storage snapshot. The records hold one picture of what sat where, so every morning starts from it. A live warehouse system would feed the real position each day.
- One box is one pair. The records list boxes by location, not how many pairs each holds.
- Box moves take a minute. The time to bring one box down is an assumption, not a measurement.
- The records end. The last day planned is the first working day after them, and nothing can check it.
Run it yourself
pip install -e .
warehouse-planner plan # plan the next working day, step by step
warehouse-planner plan --date 2023-06-16
warehouse-planner replay # plan every day and score the plans
warehouse-planner site # build this dashboard into _site/
Set ANTHROPIC_API_KEY to let Claude run the morning. Without it, the built-in rules run it.