normalize_recipe skill #69

2 Commits
Author SHA1 Message Date
dev_agentandClaude Opus 5.5 f4817f5189 Tighten normalize_recipe output checks
CI / ci (push) Successful in 1m39s
CI / ci (pull_request) Successful in 1m39s
Address review findings on the normalize_recipe skill:

- Ingredient order: an ingredient is out of order when its name has more
  of its words in another line than in its own, not merely when it
  shares no word with its own line. Swapping "olive oil" and
  "sesame oil" now fails validation and triggers the repair turn.
- Required fields: Ingredient and NormalizedRecipe decode through
  UnmarshalJSON that requires every schema field and rejects unknown
  ones; qty, unit and note may not be omitted or null. Such a reply
  fails to decode and triggers the repair turn.
- Zero total: a present JSON-LD TotalMinutes that is not positive is
  rejected by PromptInput before any model call, instead of falling
  back to the model's minutes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 14:39:22 -04:00
dev_agentandClaude Opus 5.5 925eddfa24 Add normalize_recipe skill
CI / ci (push) Successful in 1m37s
CI / ci (pull_request) Successful in 1m38s
normalize_recipe v1 turns a recipe page's title, raw ingredient lines,
steps and JSON-LD times into {ingredients: [{name, qty, unit, note}],
method, difficulty, minutes_total}. skills.NormalizeRecipe always runs it
at temperature 0. Validation requires one named ingredient per input line,
in order, so a mismatch gets the harness's repair turn. Code-derived
values win over the model's: JSON-LD total minutes, crockpot for a slow
cooker or crock pot mention, and a derived difficulty when the model gives
none. Golden tests with the Fake provider cover a typical recipe, a
repaired line-count mismatch, a slow-cooker recipe forced to crockpot and
JSON-LD minutes overriding the model.

Maestro task 9b4db226-9d8f-4251-a5de-adc45713c7bc

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 14:28:41 -04:00