# Recipes

Recipes for the `data-research` skill. Each recipe is a YAML file that declares the field-by-field shape of an extraction, the source kinds it accepts, the validations to apply, and the graph target.

A recipe is a contract. The owner reads the recipe and knows what `data-research` will write to the graph before it runs.

## Recipe shape

```yaml
name: <recipe-name>
description: One-line description of what this recipe extracts.
source_kinds:
  - email-thread       # one or more of: email-thread, web-page, pdf, text-file, form-submission
fields:
  - name: <field name>
    type: string | number | date | boolean
    required: true | false
    validation:        # optional
      min: <number>
      max: <number>
      pattern: <regex>
      enum: [a, b, c]
graph_target:
  label: <Node label that must exist in the live Neo4j ontology>
  identity:            # property names that together uniquely identify a row
    - <field name>
    - <field name>
  relationships:       # optional
    - type: <RELATIONSHIP_TYPE>
      target_label: <Node label>
      target_match: <field name>   # the field whose value resolves the target node via memory-search
```

## Updating a recipe

Recipes are part of the plugin and are committed alongside the plugin. To add or change a recipe, the owner names the extraction in conversation, the operator drafts the YAML, the owner reviews it, and the file is saved here. The `data-research` skill loads recipes by name at run-time; it does not author or modify them inline.
