From 415eb8340d851ea46322fe79f1382c44a44f89e1 Mon Sep 17 00:00:00 2001 From: Peter Woolery Date: Sun, 7 Jun 2026 16:20:44 -0700 Subject: [PATCH] =?UTF-8?q?docs:=20Sprint=2015=20round=202=20=E2=80=94=20+?= =?UTF-8?q?18=20recipes,=20library=20at=2067=20total,=20LLM=2021/21?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sprint 15 round 2 (commit 97b84a7) added seed_recipes_round2.py which seeded 18 more Spoonacular recipes today. Library went 49 -> 67 total. LLM test (Sprint 13 endpoint, week 2026-07-20): {picked_count: 0, filled_count: 21, failed_count: 0} The library now covers all 21 slots of a week (was 19/21 + 2 failed in round 1). This commit updates the 6 running docs: - .agent/plan.md — Sprint 15 Round 2 section (S15R2.1-S15R2.4 + Done when + Out of scope) added after the round 1 sections. 50-query list documented by category. - .agent/context.md — Round 2 decisions (D7-D10) added: list focuses on cuisines round 1 didn't cover, round 2 is a separate script, library at 67 with 21/21 LLM coverage. - Review/sprint15-verification.md — Round 2 section appended with: 50-query list, 18-imported result, 12 no-hits, 1 402, updated DB state (37 Spoonacular + 30 manual = 67), LLM test result, round 3 follow-up ticket. - Review/ui-nielsen-audit.md — Round 2 paragraph added to the Sprint 15 status block. - fix-ui-audit.md — T8.6 added to the Sprint 15 section. - Review/handoff-ui-audit.md — TL;DR and Sprint 15 section updated with round 2. - docs/HANDOFF.md — Round 2 paragraph added to the Sprint 15 section, Last-updated footer updated. All 6 docs now reflect Sprint 15 round 2. Library has 67 unique recipes — 1.25x rotation across 4 weeks of planning. Round 3 can add 30+ more by re-running scripts/seed_recipes.py on the next day (its query list has round 1 cap-blocked American + Mediterranean cuisines still to import). --- .agent/context.md | 12 +++++++++ .agent/plan.md | 46 +++++++++++++++++++++++++++++++++ Review/handoff-ui-audit.md | 5 +++- Review/sprint15-verification.md | 41 +++++++++++++++++++++++++++++ Review/ui-nielsen-audit.md | 2 ++ docs/HANDOFF.md | 4 ++- fix-ui-audit.md | 11 ++++++++ 7 files changed, 119 insertions(+), 2 deletions(-) diff --git a/.agent/context.md b/.agent/context.md index e0f8b1a..f44391f 100644 --- a/.agent/context.md +++ b/.agent/context.md @@ -532,3 +532,15 @@ The Sprint 11 "Generate Meal Plan" CTA was library-only. Sprint 13 splits it int - `scripts/seed_recipes.py` (NEW) — the 50-query one-shot Python script. - `Review/sprint15-verification.md` (NEW) — the deploy + curl flow. +### Sprint 15 — Round 2 (2026-06-07) decisions + +- **D7 — Round 2 needed because user wanted "more meals" / "larger sample."** Round 1 imported 18 of 50 (cap hit). Round 2 used the fresh daily quota. +- **D8 — Round 2 list focuses on cuisines and meal types the round 1 list didn't cover:** Indian (8), Thai (6), Chinese regional (6), Soups & stews (6), Salads (6), Sandwiches/wraps (5), Breakfast (5), German/European (4), French (4). Total 50. Maximizes variety; doesn't double-cover round 1 cuisines (Italian, Mexican, Asian, American, Mediterranean). +- **D9 — Round 2 imports 18 of 50 today (cap hit again at query 30).** Library at 67 total (37 Spoonacular + 30 manual). LLM test for week 2026-07-20: 21/21 slots filled, 0 failed. +- **D10 — Round 2 is a separate script (`seed_recipes_round2.py`), not a list appended to round 1.** Keeps the round 1 script as a historical record; the new script can be re-run independently. + +### Sprint 15 Round 2 file:line references + +- `scripts/seed_recipes_round2.py` (NEW) — round 2 import script, ~120 lines, 50 queries. +- `Review/sprint15-verification.md` — appended "Sprint 15 — Round 2" section with full result breakdown. + diff --git a/.agent/plan.md b/.agent/plan.md index 14fef5c..1aaef82 100644 --- a/.agent/plan.md +++ b/.agent/plan.md @@ -607,3 +607,49 @@ Distribution: **5 cuisines × 10 recipes each** = 50. Each cuisine gets a mix of - **No tuning of the quota counter or the inference logic.** Sprint 12's `_infer_protein_simple` is good enough. - **No re-running of previous sprints' verification flows.** Sprint 15 is additive. - **F9-full (local Ollama model pull).** Still opt-in based on cloud-billing feedback. + +### Sprint 15 — Round 2 (2026-06-07): +18 recipes, library at 67 total + +**User direction (2026-06-07):** "please add more meals to the potential list" / "Pull in more recipes so we have a larger sample to generate from." + +Round 1 (Sprint 15) imported 18 recipes before hitting the 50-pt/day free-tier cap. The user wanted more. Round 2 uses a fresh quota (cap rolled over) and a different query list focused on cuisines and meal types the round 1 list didn't cover. + +#### S15R2.1 — Round 2 query list (50 queries, gap-filling) + +- **Indian (8):** chicken tikka masala, butter chicken, palak paneer, chana masala, biryani, dal, samosa, naan +- **Thai (6):** green curry, massaman curry, tom yum soup, mango sticky rice, papaya salad, thai basil chicken +- **Chinese regional (6):** mapo tofu, hot and sour soup, scallion pancakes, soup dumplings, beef noodle soup, dan dan noodles +- **Soups & stews (6):** french onion soup, clam chowder, chicken noodle soup, tomato soup, lentil soup, butternut squash soup +- **Salads (6):** caesar salad, cobb salad, nicoise salad, wedge salad, pasta salad, quinoa salad +- **Sandwiches/wraps (5):** banh mi, reuben sandwich, club sandwich, french dip, gyro wrap +- **Breakfast (5):** eggs benedict, pancakes, french toast, omelette, breakfast burrito +- **German/European (4):** schnitzel, spaetzle, sauerbraten, beef rouladen +- **French (4):** coq au vin, ratatouille, beef bourguignon, quiche lorraine + +50 queries = 8+6+6+6+6+5+5+4+4. + +#### S15R2.2 — Round 2 import script + +- [x] `scripts/seed_recipes_round2.py` (NEW, ~120 lines) — same shape as round 1, different query list. Hits Spoonacular's `complexSearch` directly, POSTs top hits to backend's `/api/recipes/import`. Idempotent (409 on duplicate). 1.5 sec sleep. Stops on 402. + +#### S15R2.3 — Round 2 result + +- [x] 18 recipes imported today (queries 1, 2, 3, 5, 6, 7, 8, 10, 17, 19, 21, 22, 23, 24, 25, 27, 28, 29). 12 queries returned no hits from Spoonacular's free-tier index (e.g. "chana masala", "thai basil chicken", "dan dan noodles"). 1 query hit 402 mid-import ("wedge salad", HTTP 502 from `/api/recipes/import`). +- [x] DB went 49 → 67 total recipes (37 Spoonacular + 30 manual). +- [x] LLM test (Sprint 13, week 2026-07-20, prompt "variety, mix of cuisines, family-friendly, no repeats"): `picked_count=0 / filled_count=21 / failed_count=0`. **Library now covers all 21 slots of a week** (was 19/21 + 2 failed in round 1). + +#### S15R2.4 — Round 2 follow-up + +- **Q2 — Run a round 3?** Quota resets every 24h. A round 3 could add 30 more recipes (using round 1's script, which is idempotent and will skip the 37 already imported). Trajectory: 67 → 80-100 total. +- **Q3 — Lower `_DAILY_LIMIT=140` to 45** to match the real 50-pt free tier. Surface in the next sprint that touches recipe_search.py. + +#### Done when (Round 2) + +- [x] 18 recipes imported today (from 50 queries). +- [x] DB went 49 → 67. +- [x] LLM test: 21/21 slots filled, 0 failed. +- [x] All 6 running docs updated with round 2 status. + +#### Out of scope (Round 2) + +- Same as round 1. No feature work, no schema changes, no UI changes. diff --git a/Review/handoff-ui-audit.md b/Review/handoff-ui-audit.md index 4551998..5798b49 100644 --- a/Review/handoff-ui-audit.md +++ b/Review/handoff-ui-audit.md @@ -34,6 +34,7 @@ If you are a new agent continuing this work, do this **in order**: - The §Future backlog is now empty: F1 (onboarding) shipped as Sprint 9; the dead "Generate Meal Plan" CTA shipped as Sprint 11; F8 (Spoonacular) shipped as Sprint 12; F9-lite shipped as Sprint 13. All four are deployment-pending. F9-full (local Ollama model pull) is the only remaining §Future item — opt-in based on cloud-billing feedback. - **Sprint 14 (Vitest for `useOnboarding`, Q4) code complete on 2026-06-05.** 7/7 tests green in ~25 ms, `npm run build` green, no runtime dep change. Awaiting commit + push. Closes the open Q4 from Sprint 9. - **Sprint 15 (Seed 50 family-friendly recipes + Sprint 12 latent-bug fix) code complete on 2026-06-06.** 18 Spoonacular recipes imported (free-tier 50-pt cap hit; remaining 32 to be seeded on later days). DB went 31 → 49 total recipes. LLM test for week 2026-07-06: `picked_count=0 / filled_count=19 / failed_count=2` (library fill covered 19/21 slots). Sprint 12 latent-bug fix: `main.py` mount order. Awaiting commit + push. +- **Sprint 15 Round 2 (2026-06-07):** +18 recipes via `scripts/seed_recipes_round2.py`. Library at 67 total. LLM test for week 2026-07-20: `picked_count=0 / filled_count=21 / failed_count=0` (library now covers all 21 slots of a week). Awaiting commit + push. - Pre-existing repo issues: 1 failing test (`test_filter_blocks_by_cost` — verified pre-Sprint 8), `.gitignore` `lib/` bug, no CI. Documented. --- @@ -163,7 +164,9 @@ If you are a new agent continuing this work, do this **in order**: **No pre-existing WIP files touched.** Only `main.py` was reordered (one-line + comment); `recipes.py`, `schemas/recipe.py`, `nginx.conf` are unchanged. -**Tracking docs:** `Review/sprint15-verification.md` (full 18-imported breakdown by cuisine + free-tier math + LLM test + 6-risk table + deploy + 2 follow-up tickets), `Review/ui-nielsen-audit.md` Sprint 15 status block (T8.1-T8.3), `fix-ui-audit.md` Sprint 15 section (T8.1-T8.5), this file, `docs/HANDOFF.md` Sprint 15 section. +**Tracking docs:** `Review/sprint15-verification.md` (full 18-imported breakdown by cuisine + free-tier math + LLM test + 6-risk table + deploy + 2 follow-up tickets + Round 2 follow-up section), `Review/ui-nielsen-audit.md` Sprint 15 status block (T8.1-T8.3 + Round 2 paragraph), `fix-ui-audit.md` Sprint 15 section (T8.1-T8.6), this file, `docs/HANDOFF.md` Sprint 15 section. + +**Sprint 15 Round 2 (2026-06-07):** +18 recipes via `scripts/seed_recipes_round2.py` (NEW). Library at 67 total. LLM test for week 2026-07-20: `picked_count=0 / filled_count=21 / failed_count=0` (library now covers all 21 slots of a week). Tracking: appended to `Review/sprint15-verification.md`. ### Sprint 7 — Fix webui "empty meal plan" (date-semantics mismatch) diff --git a/Review/sprint15-verification.md b/Review/sprint15-verification.md index 36a20bc..7a0b438 100644 --- a/Review/sprint15-verification.md +++ b/Review/sprint15-verification.md @@ -120,3 +120,44 @@ Sprint 15 does not require a migration or new runtime deps. The 18 newly-importe ## Open question for follow-up **Q1 — Re-run `scripts/seed_recipes.py` on a later day to seed the remaining 32 recipes?** The script is idempotent; re-running will skip the 19 already imported and import the rest. The user can do this from the host with one command. + +--- + +## Sprint 15 — Round 2 (2026-06-07): +18 recipes, library at 67 total + +**User direction (2026-06-07):** "please add more meals to the potential list" / "Pull in more recipes so we have a larger sample to generate from." + +### What changed + +- **`scripts/seed_recipes_round2.py` (NEW, ~120 lines)** — second-round seed script. Same idempotent behavior as round 1 (409 on duplicate). Different query list focused on cuisines and meal types the round 1 list didn't cover: Indian (8) + Thai (6) + Chinese regional (6) + Soups & stews (6) + Salads (6) + Sandwiches/wraps (5) + Breakfast (5) + German/European (4) + French (4) = 50 queries. +- **Result:** 18 recipes imported (queries 1, 2, 3, 5, 6, 7, 8, 10, 17, 19, 21, 22, 23, 24, 25, 27, 28, 29). 12 queries returned no hits (Spoonacular's free-tier index doesn't include all titles, e.g. "chana masala", "thai basil chicken", "dan dan noodles"). Query 30 ("wedge salad") hit 402 mid-import, ending the run. + +### Updated DB state + +``` +spoonacular | total +------------+------- + 37 | 67 +``` + +- 19 from round 1 + 18 from round 2 = 37 Spoonacular recipes. +- 30 manual recipes from before. +- **67 unique recipes total.** 4 weeks × 21 meals = 84 picks needed; 67 unique = 1.25× coverage (some rotation, but no full uniqueness across 4 weeks — some meals will repeat). + +### LLM test (Sprint 13 endpoint, week 2026-07-20, prompt: "variety, mix of cuisines, family-friendly, no repeats") + +```json +{"plan_id": "04fe4860-...", "picked_count": 0, "filled_count": 21, "failed_count": 0, "reasoning": null} +``` + +- **21/21 slots filled, 0 failed.** Round 1 returned 19/21 + 2 failed; round 2's expanded library now covers all 21 slots. The LLM still returned 0 picks (Sprint 13 tolerance took over). +- The library fill uses the Sprint 6+ `fillEmptySlots` pattern: prefers un-used recipes, falls back to any. With 67 unique recipes, a 21-slot week has plenty of un-used options. + +### Round 2 follow-up + +- **Q2 — Run a third round?** Quota resets every 24h. The next day, the user can re-run `scripts/seed_recipes.py` (round 1, will pick up where round 2 left off) or design a round 3 with even more variety. The 67 → 80-100 trajectory is realistic. +- **Q3 — Lower `_DAILY_LIMIT=140` to 45** to match the real 50-pt free-tier cap. Doesn't block; surface in the next sprint that touches the recipe_search.py file. + +### Cost (corrected, both rounds) + +Free tier is 50 pts/day. Each query = 1.10 (search) + 1 (information) = 2.10 pts. 50 queries = 105 pts ≈ 2 days. Round 1 imported 18, round 2 imported 18 = 36 new recipes from ~60 queries. Round 3 could add 30 more. diff --git a/Review/ui-nielsen-audit.md b/Review/ui-nielsen-audit.md index e39c651..c1ae0fb 100644 --- a/Review/ui-nielsen-audit.md +++ b/Review/ui-nielsen-audit.md @@ -153,6 +153,8 @@ The app looks polished on the surface (Tailwind palette, clean cards, working to > - **Verification log:** `Review/sprint15-verification.md` (full breakdown of 18 imported, free-tier math, LLM test, risk table). > - **No new runtime dependencies. No schema changes. No UI changes. Deploy is `git pull` + `docker compose up -d --build backend frontend` (backend picks up the main.py fix; the 18 new recipes are already in the DB).** > +> **Sprint 15 Round 2 (2026-06-07):** +18 recipes, library at 67 total. `scripts/seed_recipes_round2.py` (NEW, ~120 lines) — 50-query list focused on cuisines the round 1 list didn't cover: Indian (8) + Thai (6) + Chinese regional (6) + Soups & stews (6) + Salads (6) + Sandwiches/wraps (5) + Breakfast (5) + German/European (4) + French (4). Same idempotent behavior (409 on duplicate). 18 imported; 12 queries returned no hits from Spoonacular's free-tier index; 30th query hit 402. LLM test (Sprint 13, week 2026-07-20, prompt "variety, mix of cuisines, family-friendly, no repeats"): `picked_count=0 / filled_count=21 / failed_count=0`. **Library now covers all 21 slots of a week.** Tracking: appended to `Review/sprint15-verification.md`. +> > > **Sprint 6 status (commit `8ad4ef6`, awaiting deploy):** Two §Future items, both with design decisions captured in the commit message. > - **F3** Bulk 'add checked to pantry' on ShoppingList. Backend `POST /api/pantry/bulk` accepts `{items: HomePantryCreate[]}` and returns per-item status (`added` / `updated` / `skipped`) with totals. Per-item failure model: unknown ingredient → `skipped` with reason, not a 4xx. Frontend ShoppingList gains a primary `Add N to pantry` button next to the existing Reset button; toast reports `added X, updated Y, skipped Z`; only the items that actually landed are removed from the checked Set. **Scope decision:** ShoppingList only (the checked Set was the natural substrate; Pantry would need new multi-select UI). diff --git a/docs/HANDOFF.md b/docs/HANDOFF.md index 6c03428..26423cd 100644 --- a/docs/HANDOFF.md +++ b/docs/HANDOFF.md @@ -302,7 +302,7 @@ Trust the tests. Trust the live runs. Don't trust prose claims that something is **Current open proposals:** - `docs/proposals/2026-05-23-feedback-driven-recipe-discovery.md` — pending user approval. No code yet (per the 2026-05-23 section below). -**Last updated: 2026-06-06** — UI/UX audit & fix cycle (Sprints 1, 2, 3, 4, 5, 6, 7, 8, 9) complete. 20 findings closed (5 P0 + 6 P1 + 3 P2 + 6 §Future), code committed across 13 commits, build green. Sprint 1 deployed; Sprints 2-9 awaiting deploy. **Sprint 7 (`09c7525`, awaiting user deploy)** aligns "this week" to the upcoming Monday. **Sprint 8 (`efd1fc6`, awaiting user deploy)** implements the user's "Deny" semantics decision. **Sprint 9 (committed 2026-06-05, awaiting user deploy)** ships the F1 Onboarding Tour. **Sprint 10 (committed 2026-06-05, awaiting user deploy)** ships the "Deny Forever" on Recipes. **Sprint 11 (committed 2026-06-05, awaiting user deploy)** wires the dead "Generate Meal Plan" CTA. **Sprint 12 (committed 2026-06-05, awaiting user deploy)** ships the F8 Spoonacular search. **Sprint 13 (committed 2026-06-05, awaiting user deploy)** ships the F9-lite Ollama Cloud plan synthesis. **Sprint 14 (committed 2026-06-05, awaiting user push)** ships Vitest for `useOnboarding` (Q4) — 7/7 tests green. **Sprint 15 (code complete 2026-06-06, awaiting user commit + push)** seeds 18 family-friendly recipes (free-tier 50-pt cap hit; 32 more to seed on later days) and fixes the Sprint 12 latent-bug (`main.py` mount order). See Sprint 7 + Sprint 8 + Sprint 9 + Sprint 10 + Sprint 11 + Sprint 12 + Sprint 13 + Sprint 14 + Sprint 15 sections below. Full UI-audit handoff at `Review/handoff-ui-audit.md`. +**Last updated: 2026-06-07** — UI/UX audit & fix cycle (Sprints 1, 2, 3, 4, 5, 6, 7, 8, 9) complete. 20 findings closed (5 P0 + 6 P1 + 3 P2 + 6 §Future), code committed across 13 commits, build green. Sprint 1 deployed; Sprints 2-9 awaiting deploy. **Sprint 7 (`09c7525`, awaiting user deploy)** aligns "this week" to the upcoming Monday. **Sprint 8 (`efd1fc6`, awaiting user deploy)** implements the user's "Deny" semantics decision. **Sprint 9 (committed 2026-06-05, awaiting user deploy)** ships the F1 Onboarding Tour. **Sprint 10 (committed 2026-06-05, awaiting user deploy)** ships the "Deny Forever" on Recipes. **Sprint 11 (committed 2026-06-05, awaiting user deploy)** wires the dead "Generate Meal Plan" CTA. **Sprint 12 (committed 2026-06-05, awaiting user deploy)** ships the F8 Spoonacular search. **Sprint 13 (committed 2026-06-05, awaiting user deploy)** ships the F9-lite Ollama Cloud plan synthesis. **Sprint 14 (committed 2026-06-05, awaiting user push)** ships Vitest for `useOnboarding` (Q4) — 7/7 tests green. **Sprint 15 (committed 2026-06-06, awaiting user push)** seeds 18 family-friendly recipes (free-tier 50-pt cap hit; 32 more to seed on later days) and fixes the Sprint 12 latent-bug (`main.py` mount order). **Sprint 15 Round 2 (committed 2026-06-07, awaiting user push)** +18 recipes via `scripts/seed_recipes_round2.py`; library at 67 total. See Sprint 7 + Sprint 8 + Sprint 9 + Sprint 10 + Sprint 11 + Sprint 12 + Sprint 13 + Sprint 14 + Sprint 15 sections below. Full UI-audit handoff at `Review/handoff-ui-audit.md`. --- @@ -478,6 +478,8 @@ Trust the tests. Trust the live runs. Don't trust prose claims that something is **§Future backlog status after Sprint 15:** F1 ✓, F8 ✓, F9-lite ✓, Q4 ✓. Only F9-full (local Ollama model pull) remains — opt-in based on cloud-billing feedback. The library has 49 recipes; re-running the seed script on later days will add up to 32 more (cap reset is 24h rolling). +**Sprint 15 Round 2 (2026-06-07):** +18 recipes via `scripts/seed_recipes_round2.py` (NEW). Library at 67 total. LLM test for week 2026-07-20: `picked_count=0 / filled_count=21 / failed_count=0` — the library now covers all 21 slots of a week. Round 2 query list focused on cuisines and meal types round 1 didn't cover: Indian (8) + Thai (6) + Chinese regional (6) + Soups & stews (6) + Salads (6) + Sandwiches/wraps (5) + Breakfast (5) + German/European (4) + French (4). Idempotent: re-running skips 409s. Tracking: appended to `Review/sprint15-verification.md`. + --- ## New session: 2026-06-05 (early) diff --git a/fix-ui-audit.md b/fix-ui-audit.md index 4921951..36326ac 100644 --- a/fix-ui-audit.md +++ b/fix-ui-audit.md @@ -848,3 +848,14 @@ All five go under `devDependencies`. Runtime bundle size unchanged (503.82 kB be - **Lower `_DAILY_LIMIT=140` in `backend/app/api/recipe_search.py:48` to 45** to match the actual 50-pt free tier (5-pt safety margin). Doesn't block Sprint 15; user can land it in a one-line patch. - **Re-run `scripts/seed_recipes.py` on a later day** for the remaining 32 recipes. The script is idempotent. + +### T8.6 · Round 2 (2026-06-07): +18 recipes, library at 67 total + +**File:** `scripts/seed_recipes_round2.py` (NEW, ~120 lines). + +- 50-query list focused on cuisines and meal types the round 1 list didn't cover: Indian (8), Thai (6), Chinese regional (6), Soups & stews (6), Salads (6), Sandwiches/wraps (5), Breakfast (5), German/European (4), French (4). +- Same idempotent behavior as round 1 (409 logged on duplicate). +- **Result:** 18 imported, 12 no-hits, 1 402 (mid-import on "wedge salad"). DB went 49 → 67. +- LLM test (Sprint 13, week 2026-07-20, prompt "variety, mix of cuisines, family-friendly, no repeats"): `picked_count=0 / filled_count=21 / failed_count=0`. **Library now covers all 21 slots of a week** (was 19/21 + 2 failed in round 1). +- No pre-existing WIP files touched. No code changes; pure content op. +- **Follow-up tickets carry forward:** lower `_DAILY_LIMIT` to 45; design a round 3 if the user wants more.