--- name: cook description: > Capture and search recipes and tea notes (brewing parameters, origins, tasting notes) in the cook/ directory — one markdown file per item. Triggers on: "cook: X", "save recipe X", "what do I have for X" (tea/food lookup), "tea X", tea temperature/time questions against stored notes. For growing personal food & tea knowledge — not a one-off task or a durable user fact. --- # Cook Recipes and tea notes in `cook/`, one markdown file per item. No inbox, no pipeline, no background compile — capture is inline in the same turn. **All file mutations go through the safety script.** Frontmatter is generated only by the script, never by hand — it cannot drift. ```bash uv run skills/cook/scripts/cook.py ... ``` ## Layout ``` cook/ ├── recepty/ ← recepty/.md (type: recept) ├── caj/ ← caj/.md (type: caj) └── assets/ ← cook/assets// (only if a document/photo ever arrives) ``` Slugs: kebab-case, descriptive (`gulas-classic.md`, `sencha-japonsko.md`). Subdirs are created by the script on first `add`. ## Frontmatter (script-generated) ```yaml type: recept | caj # the only fixed value category: free value # soup, main-course / green, black... cuisine: free value # recepts only origin: free value # caj only tags: [chata, winter] # user hashtags, no '#' added: 2026-09-08 # auto ``` Taxonomy is deliberately free-form — it settles over time, don't force enums. ## Capture (inline, same turn) 1. `add --type recept|caj [--category C] [--cuisine C] [--origin O] [--tags a,b]` with the body on **stdin** (heredoc). The script creates the file with frontmatter + body and prints the path. Exit 1 if the slug exists. 2. **Slug collision** → `show` the existing item, ask the user: update it via `edit`, or file as a new slug (`gulas-hrachova`). Never auto-suffix `-2`. 3. Commit: `git add cook/ && git commit -m "cook: add "`. Stage only `cook/` — never `git add -A`. 4. Confirm the file path and quote what was filed. Body language: the user's own (Czech), verbatim where sensible — the content stays in whatever language the user sends. New content appends **at the end** of a file; never insert into the middle. ### Body formats — conventions, not rigid schemas Recipe: `# `, **Ingredients**, **Steps**, **Source**, **Notes**. Tea: `# `, **Country/Type/Temperature/Time**, **Notes** (taste, smell, where bought). Adapt to what the user sends; don't force empty fields. Body section headings are free-form — match the user's language and material; the formats above are defaults, not enforced schemas. ## Search / answer 1. Narrow via script: `list [--type T] [--category C] [--tag X]` (frontmatter filters) and/or `search ` (fulltext across bodies). 2. Read the shortlisted files (`show ` or `read_file`), answer **from the files only** — no confabulation. If not covered, say so. 3. Read-only: never modify files in a search turn. ## Edit / delete — hard-gated TWO-TURN flow - **Turn 1 (no mutation):** `edit ` prints the path + full text. Show the user the exact verbatim text (or before → after), ask to confirm. STOP. - **Turn 2 (explicit confirmation only):** apply body changes with a surgical `edit_file` on the script-printed path (frontmatter stays untouched), or `delete ` / `rename `. Then commit: `git add cook/ && git commit -m "cook: edit|delete|rename "`. `rename` also moves `cook/assets//` if present. `delete` removes the assets dir only when empty — non-empty assets block silent data loss. ## House rules - Script guards: `add` on existing slug, `edit`/`delete`/`rename` on missing slug → exit 1. Never bypass the script by `write_file`-ing into `cook/` (except surgical body edits via `edit_file`/`apply_patch` after `add`). - `validate` checks frontmatter integrity — run it if files were touched by anything other than the script. - Surgical edits only — never reformat or rewrite stored recipes/notes unless asked.