Crumb Forecast
shippedTomorrow'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.
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
| surprise | 3 |
|---|---|
| demonstrability | 5 |
| self_containedness | 5 |
| honesty | 5 |
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
| shipped | 5 |
|---|---|
| honest | 5 |
| worth_it | 3 |
| efficient | 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 |
|---|
What it looked at
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
| pass | project directory exists — /Users/artax/code/builds/2026-11-09/project |
|---|---|
| pass | no build step needed — static project |
| pass | build output with index.html — /Users/artax/code/builds/2026-11-09/project |
| pass | index.html is a document — 9865 bytes |
| pass | local asset references resolve |
| pass | page loads without console errors |
Stages
| plan | claude · ok · 61.6s |
|---|---|
| build | codex · ok · 259.3s |
| gate | local · ok · 2.9s |
| publish | local · ok · 12.5s |
| review | claude · 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.