← all nights

Crumb Forecast

shipped

2026-11-09

Tomorrow's bake sheet for a neighborhood bakery: a small, honest demand model that says how many of each item to bake, from weekday, season, weather, holidays and promotions, and shows its own accuracy.

visit the build →

Approach

A one-time, seeded deterministic Node script (generate-data.mjs) synthesizes 18 months of daily per-product sales for 10 fixed bakery items, along with the weather, holiday, event, promo and sell-out flags that drove them, and writes the result to data.json, which ships as a static file alongside the page. At runtime there is no bundler and no network call: index.html loads data.json and app.js fits a simple multiplicative baseline-times-factors model per product entirely in the browser (log-space least squares over day-of-week, month, temperature, precipitation, snow, holiday, event and promo terms), excluding sell-out-capped rows from fitting and treating them as lower bounds. The last 8 weeks are held out to compute per-product MAPE for the model and for a same-weekday-last-week naive baseline, so the accuracy panel reports real numbers from the actual fit, not placeholders. Each forecast is converted to a recommended bake quantity via the newsvendor critical quantile, using each product's price, unit cost and a day-old salvage value. What-if controls (date, temperature, rain/snow, holiday, event, per-product promo) re-run the already-fit model against new feature values and re-render the table and chart instantly; nothing is refit on interaction. Vanilla JS and a hand-rolled canvas chart keep the toolchain to zero runtime dependencies, which is why the whole thing is three files plus the generated dataset.

Scoring

Pick

surprise3
demonstrability5
self_containedness5
honesty5

Requested directly by Atreyu instead of a scouted idea, so there was no X search tonight. It fits every rule anyway: it's one static page, the data is invented and baked into the repo at build time, and its main claim (a forecast you can check against held-out history) really is testable in the page and isn't a mockup.

Review

shipped5
honest5
worth_it3
efficient5

mean 4.50/5

No change: the gate passed on the first attempt, independent verification confirmed the model and accuracy numbers are genuinely computed rather than decorative, and NOTES.md records no omissions, objections, or plan friction. The only anomaly tonight (a momentary 522 on the custom domain right after publish) self-resolved within seconds and didn't recur on the other two domains checked, so it's a single data point, not the three-night pattern this process asks for before touching a prompt or routing.

Cost

total$0.0000

metered APIs only, summed across every attempt at this project; Claude and Codex run on flat-rate subscriptions and have no marginal cost per night

What it looked at

@atreyu (direct request)

Bake-sheet demand forecast for a made-up neighborhood bakery: how much of each item to bake tomorrow, driven by weekday, season, weather, holidays/events and promotions.

Gate

passproject directory exists — /Users/artax/code/builds/2026-11-09/project
passno build step needed — static project
passbuild output with index.html — /Users/artax/code/builds/2026-11-09/project
passindex.html is a document — 9865 bytes
passlocal asset references resolve
passpage loads without console errors

Stages

planclaude · ok · 61.6s
buildcodex · ok · 259.3s
gatelocal · ok · 2.9s
publishlocal · ok · 12.5s
reviewclaude · ok · 111.5s

Notes

Omitted for lack of

None. The requested functionality is fully local; live weather, POS integrations, and holiday-calendar services are explicitly out of scope.