mit einem Klick
reorder-policy
// How to decide whether and how much to reorder a SKU. Load this whenever a task involves reorder recommendations, purchase orders, or "should we restock" questions.
// How to decide whether and how much to reorder a SKU. Load this whenever a task involves reorder recommendations, purchase orders, or "should we restock" questions.
Where diamonds spawn in Minecraft 1.20.
How to produce a demand forecast for a SKU, and when to delegate that to a subagent vs. compute it yourself. Load this for any task involving "forecast", "how much will we sell", "next month", promos, or seasonal SKUs.
Fixed-format templates for Slack alerts, supplier emails, and escalations. Load this whenever the task is "notify", "alert", "email", or "tell ops".
Guide a workshop attendee through committing their starter-agent decomposition and opening a PR with their solution + workshop feedback. Invoke when the user says "submit", "I'm done", "open a PR", or asks how to share their solution.
How to rank and pick a supplier for a SKU. Load this whenever a task involves choosing a supplier, comparing quotes, or creating a purchase order.
Structure and data sources for the weekly inventory report. Load this when the task is "weekly report", "Monday report", or "summarize inventory status".
| name | reorder-policy |
| description | How to decide whether and how much to reorder a SKU. Load this whenever a task involves reorder recommendations, purchase orders, or "should we restock" questions. |
This skill encodes StockPilot's reorder rules. Use it whenever you need to decide whether to reorder a SKU and how many units to order.
| Value | Where to get it |
|---|---|
on_hand | Latest row for the SKU in /mnt/user/data/stock_levels.csv (sum across warehouses unless the task is warehouse-specific) |
reorder_point | /mnt/user/data/products.csv |
avg_daily_sales | Mean of units_sold over the last 14 days in /mnt/user/data/sales_history.csv |
lead_time_days | From the chosen supplier (see the supplier-selection skill) |
forecast_qty, confidence, flags | From the forecasting skill, only if the task looks forward more than 14 days or mentions a promo/season |
Do we reorder at all? Reorder if on_hand < reorder_point. If on_hand ≥ reorder_point, the answer is "no reorder needed" — stop here.
How much? The target order quantity is 30 days of cover plus safety stock, minus what's already on hand:
safety_stock = 1.5 × avg_daily_sales × lead_time_days
order_qty = (avg_daily_sales × 30) + safety_stock − on_hand
Round up to the supplier's min_order_qty multiple.
Confidence guard. If you obtained a forecast and confidence < 0.6, do not place a PO automatically. Instead:
/mnt/user/sinks/outbox.jsonl using the notify-templates skill (escalation template), including the flags from the forecast.Expedite? If on_hand / avg_daily_sales < lead_time_days (you'll stock out before the order arrives), pick the supplier with the shortest lead time even if it's not the cheapest, and note "expedited" in the PO.
SKU-0057: on_hand = 38, reorder_point = 120, avg_daily_sales = 18.2, chosen supplier lead_time_days = 7, min_order_qty = 50.
Sort by tier, then by days-of-cover ascending within a tier:
on_hand = 0 at any warehouse. Always first.days_of_cover < lead_time_days. Expedite or transfer.If you can't action every SKU in one pass, say how many you handled, how many remain, and list the remaining SKU IDs so the next run picks them up.
When one warehouse is low and another has surplus:
State which path you chose and why.
When you act, append to /mnt/user/sinks/purchase_orders.jsonl:
{"sku": "SKU-0057", "supplier_id": "SUP-03", "qty": 700, "expedite": true, "reason": "below reorder point; 2.1d cover"}
When you only recommend (no side-effect requested), return a structured ReorderDecision:
{"sku": "...", "reorder": true, "qty": 700, "supplier_id": "SUP-03", "expedite": true, "confidence": 0.85, "notes": "..."}