Log In

AI & Git Workflow

Cookdag AI Guide

Teach your LLM or coding agent how to write valid, idiomatic Cookdag Markdown recipes—ideal when editing your cloned Git repository.

Why This Exists

General-purpose LLMs naturally output traditional prose recipes with a separate ingredient list at the top. Cookdag relies on inline annotations (@ingredient, #cookware, ~{timer}) and explicit -> [alias] dependencies so recipes compile into Engineering Tables and DAGs and pass git push validation.

How to Use

  1. Copy the Markdown prompt below.
  2. Paste it into ChatGPT, Claude, or your repo's AGENTS.md / CLAUDE.md.
  3. Ask the assistant to convert or write a recipe as a .md file, then git commit && git push.

cookdag-llm-instructions.md

Complete syntax rules, style guidelines, and a validated example

You are writing recipes in the Cookdag Markdown dialect (.md or .cook files) for a Git-synced Cookdag repository.

Follow these rules strictly so the recipe passes Cookdag's push validation and renders cleanly as both an Engineering Table and a Directed Acyclic Graph (DAG):

1. Git Repository & File Rules
- Save each recipe as a root-level UTF-8 text file ending in .md or .cook (e.g., roasted-feta-pasta.md).
- The filename (without extension) becomes the recipe URL slug. Use lowercase kebab-case.
- Do not create subdirectories, binary files, or files larger than 256 KB.

2. Metadata Headers (top of file)
- Use >> key: value lines at the top:
  >> title: Recipe Title
  >> tags: tag1, tag2
  >> servings: 4
  >> time: 30m
  >> source: https://example.com/recipe or Cookbook Title, p. 42
  >> note: Optional tip, substitution, or storage instruction (repeat for multiple notes)

3. Cookdag Inline Syntax
- Ingredients: @ingredient name{quantity%unit}
  Examples: @olive oil{2%tbsp}, @garlic{3%cloves}, @salt{1%pinch}
  Always use numeric quantities + %unit when possible so Cookdag's servings scaler works.
- Cookware: #cookware or #multi word cookware{}
  Examples: #skillet, #baking dish{}, #large pot{}
- Timers: ~{duration%unit}
  Examples: ~{10%min}, ~{30%s}
- Step Outputs & Dependencies (DAG):
  - Produce an intermediate component at the end of a step with -> [alias]
  - Produce multiple reusable outputs from one step with -> [output a], [output b] (e.g., -> [al dente pasta], [pasta water])
  - Reference any produced component in a later step with [alias]
  - Every [alias] you consume must be produced by an earlier step's -> [alias] (or multi-output list)
- Sections for Multi-Phase Recipes: == Section Name ==
  - For recipes with 6+ steps or distinct phases (e.g., == Batter == and == Cooking & Caramelizing ==, or == Dough == and == Filling ==), split them into named == Section == blocks so Engineering Tables stay compact and scannable. Omit sections for short 2–5 step recipes.

4. Cookdag Style Guidelines
- Never write a separate "Ingredients:" bullet list at the top; declare every ingredient inline in the exact step that uses it.
- Write one atomic cooking action per paragraph (separated by a blank line).
- Start each step with a clear imperative verb (Roast, Boil, Whisk, Sear, Toss).
- Model parallel tasks as independent branches (e.g., roasting sauce in parallel with boiling pasta) that converge via [alias] in a final step.
- Keep step text concise so table cells stay scannable in the Engineering Table and Cook Mode.

Valid Example:

>> title: Roasted Feta & Cherry Tomato Pasta
>> tags: vegetarian, pasta, weeknight
>> servings: 4
>> time: 35m
>> source: https://example.com/roasted-feta-pasta
>> note: Use block feta in brine for maximum creaminess.
>> note: Reserve 1/2 cup pasta water before draining to adjust sauce consistency.

Toss @cherry tomatoes{500%g}, @feta block{200%g}, @garlic{4%cloves}, and @olive oil{3%tbsp} in #baking dish{} and roast for ~{30%min} -> [roasted base].

Boil @pasta{400%g} in #large pot{} with @salted water{2%l} for ~{10%min} and drain -> [cooked pasta].

Mash [roasted base] into a creamy sauce and toss with [cooked pasta], @fresh basil{1%handful}, and @black pepper{1%tsp}.