# Recipe logging agent (Cursor + MCP)

> **New authoring path:** use the independent recipe knowledge draft tools described in
> [Recipe knowledge API](recipe-knowledge.md). Draft a loose subject when a catalogue food name
> has no subject; do not create a canonical finished-food concept to support a recipe. Draft
> documented formulations or inferred ingredient assessments with their origin and locator.
> Missing canonical meat stays on the formulation as `unresolvedIngredient`. Human approval is
> required; explicit chat confirmation can authorize the agent to execute publication in Admin.

Use this playbook in an interactive Cursor session with Meat Ontology MCP and Lucius MCP connected.
The same workflow is the Cursor skill **Recipe logging agent**
(`.cursor/skills/recipe-logging-agent/SKILL.md`). The agent drafts loose recipe subjects,
formulations and ingredient assessments outside the canonical ontology. Human review can occur in
chat; the agent may then execute the specifically approved Admin actions.

## Chat approval and Admin execution

Present a concrete package with its environment, revisions, claims, intended publication and
exact item mappings. Explicit user confirmation in chat authorizes the agent to execute the
actions included in that package through the existing signed-in Admin workflow or an already
authorized Admin API. Do not require the user to approve again in the dashboard or perform a
final publication click. A confirmation such as “I approved” applies to the concrete package
being discussed, subject to any narrower scope the user stated.

Review, publication and item links remain distinct audited operations, but may share one chat
approval when all were included in the presented package. Approval of research or drafts alone
does not authorize publication; knowledge-only approval does not add unpresented item mappings.
Recheck live state and the combined preview before execution, preserve existing decisions,
record the user confirmation and actual execution identity, and verify publication and reads.
Pause only dependent actions if the reviewed scope or preview materially changes, a conflict
appears, or a tool requires further confirmation.

The drafting MCP client remains draft-only; do not broaden its scopes, bypass authentication or
publish through MCP. This rule does not authorize canonical ontology releases, deployments,
listing/Raptor writes or other work outside the confirmed recipe-knowledge package.

## Credentials

Issue a Meat Ontology API client with `taxonomy:read`, `taxonomy:resolve`, and `taxonomy:knowledge.draft`.
Do not grant `taxonomy:admin`. Lucius uses a read-only bearer token. Copy
`.cursor/mcp.json.example` from the `MeatBorsa/meat-ontology` repository to your Cursor MCP config and fill
environment variables; never commit keys.

## Loop

1. Read the catalogue item from Lucius (`find_companies_by_item_name` or
   `list_products_needing_recipes`). Use `product_recipes_and_makers` when a concept id is
   already known.
2. Call `resolve_recipe_subjects` on the catalogue name. Preserve ambiguous matches for review.
   If unresolved, draft a loose subject with `draft_recipe_subject`; never create a canonical
   finished-food concept to make a recipe possible.
3. Inspect `list_subject_formulations` and `list_ingredient_assessments` for the matched subject
   before proposing a successor or an ingredient assessment.
4. Find a real source URL. Store structure, not copyrighted recipe prose. Use [Preferred
   sources](#preferred-sources) first.
5. Resolve each meat ingredient against the canonical ontology. Keep resolver ambiguity. Never invent a concept ID and never
   widen to a parent cut to hide a gap.
6. Draft a sourced formula with `draft_subject_formulation`:
   - mapped meat: `conceptIds` (one-of alternatives on one input)
   - missing meat: `conceptIds: []` and `unresolvedIngredient` set to the source name
   - non-meat leftovers: `otherIngredients`
   - `evidence.locator` is required; inferred evidence also needs `method`
   An ingredient-only pass can use `draft_ingredient_assessment` with a scoped `typical`,
   `possible`, `not_typical` or `unknown` outcome. Never infer a negative from absence.
7. Present the knowledge revision IDs and intended actions for human review. After explicit chat
   approval, execute the authorized Admin review, preview and publication steps under the rule
   above; verify the resulting snapshot rather than stopping at approved revisions.
8. After publication, execute the approved exact catalogue-item mappings and verify consumption,
   keeping the loose subject ID separate from every canonical concept ID.

## Preferred sources

Ranked order for loop step 4. Prefer a source that matches the product's country of sale or
traditional identity. The fuller catalogue (names, jurisdictions, URLs, what each is good for)
is in [Preferred recipe sources](mcp-recipe-agent-preferred-sources.md).

### Ranking

1. **Government and official national codes** (highest). National ministries, food-safety
   authorities, official gazettes, and legally recognized food books, Leitsätze, codes of
   practice, and quality or composition standards that define meat-product identity or
   formulation. EU GI product specifications (PDO, PGI, TSG) count here for the named product.
   Horizontal EU rules (for example Regulation (EU) 1169/2011 meat-as-ingredient and minced-meat
   composition) count here when they actually constrain the product; they are not a substitute
   for a national identity code.
2. **FAO** (below government). FAO/WHO Codex Alimentarius standards hosted on FAO, and other
   FAO-path composition or formulation material. Use Codex when no matching national or EU
   official identity or composition source exists, or as a secondary cross-check. **Never rank FAO
   equal to or above a matching government source.**

Do not start with blogs, trade magazines, manufacturer marketing pages, or Wikipedia. Industry
association guidelines that are not legally recognized codes of practice are not rank 1.
FAOLEX is a **finder** for rank-1 national texts, not a rank-2 source itself.

### How to use

1. Take market or traditional jurisdiction from the Lucius catalogue item (producer country,
   sales name, protected name).
2. Open that jurisdiction's official meat-product code from the starter list below or the
   [fuller catalogue](mcp-recipe-agent-preferred-sources.md).
3. If the name is a PDO, PGI, or TSG, use the eAmbrosia specification for that name.
4. If the national code has no matching product, search FAOLEX for that country's meat-product
   quality legislation, then cite the official gazette or ministry text FAOLEX points to.
5. Only then use Codex CXS meat-product standards, then FAO processing manuals.

Record `evidence.locator` as the specific official page or PDF that states the composition or
identity rule, not a ministry homepage.

### Starter list (rank 1 then rank 2)

| Rank | Jurisdiction | Source | URL | Use for |
| --- | --- | --- | --- | --- |
| 1 | Germany | BMLEH / Deutsches Lebensmittelbuch, *Leitsätze für Fleisch und Fleischerzeugnisse* | [bmleh.de](https://www.bmleh.de); [Leitsätze PDF](https://www.bmleh.de/SharedDocs/Downloads/DE/_Ernaehrung/Lebensmittel-Kennzeichnung/LeitsaetzeFleisch.pdf?__blob=publicationFile&v=2); [DLMBK](https://www.deutsche-lebensmittelbuch-kommission.de/) | German sausage, ham, and processed-meat identity, meat-protein (BEFFE), and customary composition |
| 1 | Austria | Codex Alimentarius Austriacus, chapter B 14 | [lebensmittelbuch.at B 14](https://www.lebensmittelbuch.at/lebensmittelbuch/b-14-fleisch-und-fleischerzeugnisse); [ministry PDF](https://www.verbrauchergesundheit.gv.at/lebensmittel/das-oesterreichische-lebensmittelbuch/codexkapitel.html) | Austrian sausage recipes, raw-material grades, and analytical limits |
| 1 | France | *Code des usages de la charcuterie* (presented to DGCCRF) | [code-des-usages-charcuterie.fr](https://www.code-des-usages-charcuterie.fr/) | French charcuterie, salaison, and canned-meat denominations and formulation rules |
| 1 | Spain | Real Decreto 474/2014, *norma de calidad de derivados cárnicos* | [BOE ELI](https://www.boe.es/eli/es/rd/2014/06/13/474) | Spanish meat-product classes, composition factors, and physico-chemical limits |
| 1 | Czechia | Vyhláška č. 69/2016 Sb. (as amended) | [zakonyprolidi.cz](https://www.zakonyprolidi.cz/cs/2016-69) | Reserved names and composition tables for selected meat products |
| 1 | Hungary | Magyar Élelmiszerkönyv 1-3/13-1 (152/2009 FVM, as amended) | [elelmiszerlanc.kormany.hu](https://elelmiszerlanc.kormany.hu/i-kotet) | Hungarian meat-product names, meat content, and composition |
| 1 | Croatia | *Pravilnik o mesnim proizvodima* (NN 62/2018) | [Narodne novine](https://narodne-novine.nn.hr/clanci/sluzbeni/full/2018_07_62_1292.html) | Croatian meat-product names, composition, and physico-chemical limits |
| 1 | Bulgaria | БДС 2589:1983 durable dry sausages; TSG specs via eAmbrosia | [BDS 2589](https://bds-bg.org/en/project/show/bds:proj:22530); [eAmbrosia](https://ec.europa.eu/agriculture/eambrosia/geographical-indications-register/) | Bulgarian dry-sausage identity (lukanka, sudzhuk) and protected-name formulations |
| 1 | Netherlands | Warenwetbesluit Vlees, gehakt en vleesproducten | [wetten.nl BWBR0009675](https://wetten.overheid.nl/BWBR0009675) | Dutch meat, minced meat, and meat-product composition constraints |
| 1 | United Kingdom | Products Containing Meat etc. Regulations (reserved descriptions) | [England SI 2014/3001](https://www.legislation.gov.uk/uksi/2014/3001) | Minimum meat content for reserved names (sausage, burger, pie, and similar) |
| 1 | EU | eAmbrosia GI register | [eAmbrosia](https://ec.europa.eu/agriculture/eambrosia/geographical-indications-register/) | PDO/PGI/TSG product specifications for named meats and sausages |
| 1 | EU | Regulation (EU) 1169/2011 Annex VI B and Annex VII B point 17 | [EUR-Lex 1169/2011](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32011R1169) | Minced-meat fat/collagen limits; what may be labelled as “… meat” |
| 2 | FAO / Codex | Codex meat-product standards (CXS 88, 89, 96, 97, 98, and related) | [Codex standards list](https://www.fao.org/fao-who-codexalimentarius/codex-texts/list-standards/en/) | International identity and essential composition when no matching national code applies |
| 2 | FAO | FAO meat-processing manuals | [Meat processing technology](https://www.fao.org/4/t0279e/T0279E00.htm); [Small-scale sausage production](https://www.fao.org/4/x6556e/x6556e00.htm) | Typical formulations only after Codex and after government sources |

## Forbidden

- Publishing an ontology release or recipe knowledge snapshot
- Creating or editing anatomical meat, commodity, or other canonical concepts
- Collapsing unresolved or ambiguous resolver results to the first candidate
- Auto-applying Lucius ontology mappings
