New bulk job at /dedupe-recipes (and /api/recipes/dedupe-* + admin variants). Mirrors the consolidate_foods pattern but for recipes themselves rather than the foods table: Walk: - Pull all household recipes via list_recipes (paginated, ~250 for Cobb) - Cluster by name token_set_ratio ≥ 85 - For each multi-recipe cluster, fetch full bodies + build a summary (slug, name, source_url, ingredient_summary, step_count, yields) - Ask Sonnet via forge.recipe_dedupe_decision: are these the same dish? canonical_slug + delete_slugs + reason - Persist proposal Apply: - Per approved proposal: DELETE each delete_slug via Mealie API - Mark applied / record error per cluster Schema: migrations 021+022 (cauldron_recipe_dedupe_jobs + cauldron_recipe_dedupe_proposals). Same state machine: running → review → applying → done/failed/cancelled. Same daemon-thread runner with cancel-respect + stuck-recovery. Sonnet integration: - recipe_dedupe_decision prompt is conservative-by-default. duplicates= false on the slightest doubt (different ingredient sets, suggestive name differences, etc). Picks canonical = cleanest name + most complete data + lex-older slug as tiebreaker. Mealie integration: - mealie.delete_recipe(slug) → DELETE /api/recipes/<slug>. Permanent. Permission-scoped per-household (cross-household will 403). UI: - /dedupe-recipes — same shape as /consolidate but with side-by-side recipe cells (canonical marked ★ KEEP, deletes marked × DELETE in red). Source URLs link out so user can sanity-check. - DEFAULT TO NOT-APPROVED — recipe deletion is destructive, user must opt in per cluster. Bulk "approve all dupes" is one click but the apply confirm explicitly counts how many recipes will die. - Linked from /me alongside sterilize + consolidate. Cobb confirmed earlier: "we can't lose recipe data" — answered by (1) conservative Sonnet decisions, (2) opt-in default, (3) explicit permanent-deletion confirm, (4) same-pattern logging + DB audit trail on every attempt. |
||
|---|---|---|
| cauldron | ||
| scripts | ||
| tests | ||
| .env.example | ||
| .gitignore | ||
| compose.yml | ||
| Dockerfile | ||
| LICENSE | ||
| README.md | ||
| requirements.txt | ||
cauldron
Mealie-backed AI meal planner + shopping list for the family. LAN-only,
internal tool. Mealie at recipes.sulkta.com is the source of truth for
recipes / meal plans / shopping lists; cauldron is the AI layer + Abby's
branded UI on top.
Status
v0.1 — backend bones (current). Ingredient sterilizer endpoint working. No UI yet; bearer-auth API only. Frontend + Authentik OIDC arrives in v0.2. Native Kotlin Android in v0.5.
Surface (v0.1)
GET /healthz liveness + clawdforge upstream
GET /api/recipes list Mealie recipes (paginated)
POST /api/sterilize/preview/<slug> dry-run AI parse, return proposals
POST /api/sterilize/apply/<slug> write parses back to Mealie
All routes except /healthz require Authorization: Bearer <ADMIN_BEARER>.
Architecture
Abby's phone (later: Kotlin app)
│
▼
cauldron (Flask, port 7790, LAN-only)
├─ Mealie API client ─── recipes.sulkta.com (source of truth)
├─ clawdforge client ─── 192.168.0.5:8800 (claude -p runner)
└─ Authentik OIDC (v0.2)
cauldron does NOT hold its own database in v0.1 — all state lives in Mealie. A small Postgres/MariaDB schema lands in v0.2 for Abby-specific prefs + chat history.
Ingredient sterilizer
Mealie's CRF parser is mediocre. Cobb's hand-typed recipes have lots of free-form quantity strings ("about 2 cups cooked white rice", "1 small handful kale", "a pinch of salt") that don't aggregate cleanly into a shopping list.
The sterilizer batches all ingredients of one recipe into a single Sonnet call (via clawdforge), gets back parallel structured parses, then on apply links each parse to existing Mealie food/unit records (creating any missing by name) and PUTs the recipe back.
Preview is non-destructive — review proposals before apply.
# Dry-run preview
curl -sS -X POST -H "Authorization: Bearer $ADMIN_BEARER" \
http://192.168.0.5:7790/api/sterilize/preview/spaghetti-bolognese | jq .
# Apply (creates missing foods/units by default)
curl -sS -X POST -H "Authorization: Bearer $ADMIN_BEARER" \
http://192.168.0.5:7790/api/sterilize/apply/spaghetti-bolognese | jq .
Deploy
ssh lucycd /mnt/user/appdata && git clone <gitea-url> cauldron && cd cauldron/build(or wherever the deploy convention lands)- Drop
.envat/mnt/cache/appdata/secrets/cauldron.env(chmod 600 root:root)CLAWDFORGE_TOKENis already populated by the bootstrap (seememory/2026-04-28.md)MEALIE_API_TOKEN— mint atrecipes.sulkta.com→ user → API tokensADMIN_BEARER— pick 32 bytes of entropySECRET_KEY— 32 bytes for Flask sessions
docker compose up -d --build- Smoke:
curl http://192.168.0.5:7790/healthz
Roadmap
- v0.1 ✓ — sterilizer backend + Flask shell
- v0.2 — Authentik OIDC, Abby-branded web UI, palette CSS, postgres for prefs
- v0.3 — meal plan generator (week → Mealie meal plan write)
- v0.4 — shopping list aggregator (read meal plan → consolidated grocery list)
- v0.5 — native Kotlin + Compose Android app (read-only shopping list + plan view)
Repo layout
cauldron/
├─ cauldron/
│ ├─ config.py env-driven config
│ ├─ forge.py clawdforge HTTP client
│ ├─ mealie.py Mealie API client
│ ├─ sterilizer.py ingredient parse + apply pipeline
│ └─ server.py Flask app
├─ Dockerfile
├─ compose.yml
├─ requirements.txt
└─ .env.example