Commit graph

29 commits

Author SHA1 Message Date
0da1d97a60 feat: recipe + settings frontend — Recipes and Settings tabs
- RecipesView: level selector (1-4), constraints/allergies tag inputs,
  hard day mode toggle, max missing input, expiry-first pantry extraction,
  recipe cards with collapsible swaps/directions, grocery links, rate
  limit banner
- SettingsView: cooking equipment tag input with quick-add chips, save
  with confirmation feedback
- stores/recipes.ts: Pinia store for recipe state + suggest() action
- stores/settings.ts: Pinia store for cooking_equipment persistence
- api.ts: RecipeRequest/Result/Suggestion types + recipesAPI + settingsAPI
- App.vue: two new tabs (Recipes, Settings), lazy inventory load on tab switch
2026-03-31 19:20:13 -07:00
ae9137585a fix: renumber background_tasks migration 006→013 (conflict with element_profiles) 2026-03-31 14:28:10 -07:00
206b930aff Merge branch 'feature/shared-task-scheduler' 2026-03-31 14:27:51 -07:00
5064681a4b Merge branch 'feature/recipe-engine'
Recipe engine Phase 3 complete (Tasks 1-15):
- Data pipeline: USDA FDC, FlavorGraph, food.com corpus, substitution pairs
- ElementClassifier, SubstitutionEngine, RecipeEngine (Levels 1-4)
- StyleAdapter with 5 cuisine templates
- LLMRecipeGenerator (Level 3 scaffold + Level 4 wildcard)
- User settings with cooking_equipment for hard day mode
- Grocery affiliate links (Amazon Fresh, Walmart, Instacart)
- Recipe + staple + settings API endpoints with tier gating
- 55 tests passing
2026-03-31 14:27:32 -07:00
a5c59674f2 feat: recipe engine Phase 3 — StyleAdapter, LLM levels 3-4, user settings
Task 13: StyleAdapter with 5 cuisine templates (Italian, Latin, East Asian,
Eastern European, Mediterranean). Each template includes weighted method_bias
(sums to 1.0), element-filtered aromatics/depth/structure helpers, and
seasoning/finishing-fat vectors. StyleTemplate is a fully immutable frozen
dataclass with tuple fields.

Task 14: LLMRecipeGenerator for Levels 3 and 4. Level 3 builds a structured
element-scaffold prompt; Level 4 generates a minimal wildcard prompt (<1500
chars). Allergy hard-exclusion wired through RecipeRequest.allergies into
both prompt builders and the generate() call path. Parsed LLM response
(title, ingredients, directions, notes) fully propagated to RecipeSuggestion.

Task 15: User settings key-value store. Migration 012 adds user_settings
table. Store.get_setting / set_setting with upsert. GET/PUT /settings/{key}
endpoints with Pydantic SettingBody, key allowlist, get_session dependency.
RecipeEngine reads cooking_equipment from settings when hard_day_mode=True.

55 tests passing.
2026-03-31 14:15:18 -07:00
b3c6099691 feat: StyleAdapter — 5 cuisine templates with element dimension biasing 2026-03-31 12:54:42 -07:00
d9351c772b fix: recipes endpoint — inject session tier before all gate checks 2026-03-31 12:52:10 -07:00
4773465904 feat: recipe + staple API endpoints with tier gating 2026-03-31 12:49:38 -07:00
93e48ce639 fix: grocery_links — guard against empty ingredient names in build_links 2026-03-31 12:44:58 -07:00
2233d55e25 feat: RecipeEngine Level 1-2 — grocery links + affiliate deeplink builder
Add GroceryLink schema model and grocery_links field to RecipeResult.
Introduce GroceryLinkBuilder service (Amazon Fresh, Walmart, Instacart)
using env-var affiliate tags; no links emitted when tags are absent.
Wire link builder into RecipeEngine.suggest() for levels 1-2.
Add test_grocery_links_free_tier to verify structure contract.

35 tests passing.
2026-03-31 12:23:07 -07:00
3a064bcac8 feat: RecipeEngine Level 1-2 — corpus match, substitution, grocery list, hard day mode 2026-03-31 11:50:28 -07:00
294974886d fix: store — deserialize recipe JSON columns in _row_to_dict 2026-03-31 11:33:49 -07:00
97e8889d89 feat: store — recipe search, rate-limit check, substitution feedback logging 2026-03-31 11:29:54 -07:00
a17dcc8c55 feat(tasks): add background task scheduler for LLM expiry fallback
Uses circuitforge_core.tasks.scheduler. VRAM detection via cf-orch when
available, falling back to unlimited. Adds expiry_llm_fallback task type
to background-predict expiry dates for items the LUT doesn't cover.
2026-03-31 09:25:48 -07:00
925d1eeacb fix: test fixture — add protein_delta to substitution_pairs inserts 2026-03-30 23:16:15 -07:00
2ca76bddec feat: SubstitutionEngine — deterministic swap candidates with compensation hints 2026-03-30 23:13:49 -07:00
0e1eae9a90 fix: pipeline scripts — connection safety, remove unused recipes_path arg, fix inserted counter, pre-load profile index 2026-03-30 23:10:52 -07:00
ba6766b1d9 fix: staple library — consistent tofu_firm slug, load error handling, typed yield_formats, expanded test coverage 2026-03-30 23:10:51 -07:00
12ebd11092 fix: ElementClassifier — guard empty input, safe JSON decode, dedup heuristic elements, strengthen test assertions 2026-03-30 23:10:49 -07:00
c0ac6f6776 feat: staple library -- seitan, tempeh, firm tofu with yield format profiles 2026-03-30 23:01:52 -07:00
421a52cb50 feat: ElementClassifier -- ingredient element tagging with heuristic fallback 2026-03-30 22:59:46 -07:00
67cfd70e92 feat: data pipeline -- recipe corpus + substitution pair derivation 2026-03-30 22:55:41 -07:00
7fd2cc75c4 feat: tiers -- leftover_mode rate-limited free, style_picker paid+, staple_library free 2026-03-30 22:50:35 -07:00
320657e61a feat: data pipeline -- FlavorGraph molecule index builder 2026-03-30 22:46:53 -07:00
b1fa55c809 feat: data pipeline -- USDA FDC ingredient index builder 2026-03-30 22:44:25 -07:00
1010543c71 feat: migrations 005-011 — fix receipts column bug + recipe engine tables 2026-03-30 22:33:25 -07:00
949c103050 chore: add recipe engine pipeline dependencies 2026-03-30 22:30:05 -07:00
0aa36b02ac fix: remove .env from tracking (contains DIRECTUS_JWT_SECRET)
.gitignore already excludes .env — was accidentally included in initial commit.
DIRECTUS_JWT_SECRET is present in git history and should be rotated before push.
2026-03-30 22:21:19 -07:00
c166e5216a chore: initial commit — kiwi Phase 2 complete
Pantry tracker app with:
- FastAPI backend + Vue 3 SPA frontend
- SQLite via circuitforge-core (migrations 001-005)
- Inventory CRUD, barcode scan, receipt OCR pipeline
- Expiry prediction (deterministic + LLM fallback)
- CF-core tier system integration
- Cloud session support (menagerie)
2026-03-30 22:20:48 -07:00