bakery-ops

v1.0.0 MIT food-drink updated 2026-09-27

Plan the daily bake from sales history and scale recipes — feed in a CSV of item/date/units sold and a target date to get suggested daily par per item (same-weekday average x 1.1 safety factor), or pass a recipe JSON and a multiplier to scale ingredient quantities. Use when deciding how much to bake each morning or resizing a recipe.

$ skillbank install bakery-ops@1.0.0
# pins exactly 1.0.0 · README + changelog included

Bakery Ops

Overview

Overbaking wastes product; underbaking loses sales. Bakery Ops looks at your sales history and suggests tomorrow's bake: for each item it averages units sold on that same weekday in the past and multiplies by a 1.1 safety factor, rounded to whole units. Items with no same-weekday history fall back to their overall average (marked with *). The same script also scales recipes — pass an ingredient-quantity JSON and a factor, get the scaled amounts back.

Everything runs on your own machine. The script reads your CSV or JSON and prints the answer — nothing is uploaded anywhere.

Installation

1. Copy the bakery-ops/ directory anywhere convenient. 2. Make the script executable (Unix):


   chmod +x scripts/par.py

No pip install needed — standard library only.

Configuration

Par mode reads a sales-history CSV. Header row required, exactly these column names:


item,date,units_sold
butter croissant,2026-09-07,48
butter croissant,2026-09-14,52
sourdough loaf,2026-09-07,22

Scale mode reads a recipe JSON object of ingredient to quantity:


{"flour_g": 1000, "water_g": 650, "salt_g": 20, "yeast_g": 8}

Inputs

| Input | Required | Description | |------------|---------------------|----------------------------------------------------------| | csv | yes (par mode) | Sales-history CSV (columns above). | | --date | yes (par mode) | Target date YYYY-MM-DD for the par suggestion. | | --scale | yes (scale mode) | Recipe JSON file: {ingredient: quantity}. | | --factor | yes (scale mode) | Scale multiplier, e.g. 2 to double, 0.5 to halve. |

Worked example


$ ./scripts/par.py sales.csv --date 2026-09-28
SUGGESTED PAR — 2026-09-28 (Monday)
ITEM                          AVG     PAR  SOURCE
----------------------------------------------------
butter croissant             50.0      55  same weekday (n=3)
cinnamon roll                15.0      16  overall avg (n=1) *
sourdough loaf               22.3      25  same weekday (n=3)
----------------------------------------------------
par = avg x 1.1 safety factor, rounded to whole units
* no same-weekday history for this item; used overall average

$ ./scripts/par.py --scale recipe.json --factor 2.5
SCALED RECIPE (x2.5)
--------------------------------
flour_g                  2,500
water_g                  1,625
salt_g                   50
yeast_g                  20

Playbooks

Safety notes

This is a benign business tool. Pars are suggestions from your own sales history — adjust for holidays, weather, and events the history can't see. All data stays on your machine; the script makes no network calls and never uploads anything.

Version history

Changelog

1.0.0 — 2026-09-27

  • Initial release: scripts/par.py bakery par calculator with two modes —
  • daily par from sales history (same-weekday average x 1.1 safety factor, whole units) and recipe scaling (ingredient JSON x factor).

  • Playbook: sales-CSV habit, fallback reading, safety-factor tuning.

← back to catalog