Skip to content

Tutorial · 8 steps

From a simple recipe to a complete Cooking Chart

We will write spaghetti with tomato sauce, starting with the bare minimum and adding one idea at each step. Each step shows the code, with what is new highlighted, and how the chart changes.

Step 1 / 8

The bare minimum

A recipe has three parts: the ingredients, the steps and the dish you serve. Each step is a single line:

result = verb(inputs) duration

The verb comes from a shared vocabulary. boil is a stovetop verb (orange bar) and unattended by default: while it boils you can do something else. That is why the bar is hatched.

recipe "Spaghetti with tomato sauce"

ingredients
  pasta  200 g
  water  2 l

spaghetti = boil(pasta, water) 10min

serve spaghetti

This is the chart

recipe "Spaghetti with tomato sauce" ingredients pasta 200 g water 2 l spaghetti = boil(pasta, water) 10min serve spaghetti

Ingredients drop onto the step that uses them, with their quantity. The gold circle is the dish, with the total time.

Step 2 / 8

Chaining steps

First the water boils, then the pasta cooks, and finally it is drained. Just use the result of one step as an input of the next: boiling_water comes out of one step and goes into the other.

You don't write times or the order of the steps: the scheduler works them out from the names.

4 new or changed lines Open this step in the editor ↗
recipe "Spaghetti with tomato sauce"

ingredients
  pasta  200 g
  water  2 l
  salt   1 tbsp

boiling_water = boil(water) 8min
cooked_pasta  = boil(pasta, boiling_water, salt) 10min
spaghetti     = drain(cooked_pasta) 1min

serve spaghetti

This is the chart

recipe "Spaghetti with tomato sauce" ingredients pasta 200 g water 2 l salt 1 tbsp boiling_water = boil(water) 8min cooked_pasta = boil(pasta, boiling_water, salt) 10min spaghetti = drain(cooked_pasta) 1min serve spaghetti

The salt doesn't go in at the start: it drops in right when the pasta starts cooking, which is when it is used. Draining isn't hatched, because that one needs you.

Step 3 / 8

Something in parallel: the sauce

The sauce doesn't depend on the pasta, so it can be made at the same time. You don't say it is parallel: you just write it. The chart gives it its own lane and makes it flow into the step that uses it, mix.

One after another these steps would take 44 minutes; in parallel the recipe takes 25.

8 new or changed lines Open this step in the editor ↗
recipe "Spaghetti with tomato sauce"

ingredients
  pasta   200 g
  water   2 l
  salt    1 tbsp
  garlic  2 cloves
  oil     3 tbsp
  tomato  400 g

boiling_water = boil(water) 8min
cooked_pasta  = boil(pasta, boiling_water, salt) 10min
spaghetti     = drain(cooked_pasta) 1min

chopped_garlic = chop(garlic) 3min
soffritto      = sweat(chopped_garlic, oil) 5min
sauce          = simmer(soffritto, tomato) 15min

dish = mix(spaghetti, sauce) 2min

serve dish

This is the chart

recipe "Spaghetti with tomato sauce" ingredients pasta 200 g water 2 l salt 1 tbsp garlic 2 cloves oil 3 tbsp tomato 400 g boiling_water = boil(water) 8min cooked_pasta = boil(pasta, boiling_water, salt) 10min spaghetti = drain(cooked_pasta) 1min chopped_garlic = chop(garlic) 3min soffritto = sweat(chopped_garlic, oil) 5min sauce = simmer(soffritto, tomato) 15min dish = mix(spaghetti, sauce) 2min serve dish

The sauce sets the pace: it is the critical path (the white line under its bars). The pasta finishes earlier and waits: that is the dashed stretch.

Step 4 / 8

An ingredient halfway through

Not everything goes in at the start of a step. The basil is added when the sauce has been on the heat for 12 minutes. Write it with a + right below the step:

+ basil at 12min

The minute counts from the start of that step. It also works for something prepared in another step, not only for ingredients.

2 new or changed lines Open this step in the editor ↗
recipe "Spaghetti with tomato sauce"

ingredients
  pasta   200 g
  water   2 l
  salt    1 tbsp
  garlic  2 cloves
  oil     3 tbsp
  tomato  400 g
  basil   6 leaves

boiling_water = boil(water) 8min
cooked_pasta  = boil(pasta, boiling_water, salt) 10min
spaghetti     = drain(cooked_pasta) 1min

chopped_garlic = chop(garlic) 3min
soffritto      = sweat(chopped_garlic, oil) 5min
sauce          = simmer(soffritto, tomato) 15min
  + basil at 12min

dish = mix(spaghetti, sauce) 2min

serve dish

This is the chart

recipe "Spaghetti with tomato sauce" ingredients pasta 200 g water 2 l salt 1 tbsp garlic 2 cloves oil 3 tbsp tomato 400 g basil 6 leaves boiling_water = boil(water) 8min cooked_pasta = boil(pasta, boiling_water, salt) 10min spaghetti = drain(cooked_pasta) 1min chopped_garlic = chop(garlic) 3min soffritto = sweat(chopped_garlic, oil) 5min sauce = simmer(soffritto, tomato) 15min + basil at 12min dish = mix(spaghetti, sauce) 2min serve dish

The basil drops onto the simmering bar at its exact minute, not at the start.

Step 5 / 8

Tools and hands

So far the chart assumed endless hands. With cooks 1 you say a single person is cooking, and the scheduler won't let two steps that need your hands overlap.

We also declare the tools and where each step happens (in pot, with colander), plus a parameter like @heat:low. All of this is optional: you only write it if it matters to you.

9 new or changed lines Open this step in the editor ↗
recipe "Spaghetti with tomato sauce"
cooks 1

ingredients
  pasta   200 g
  water   2 l
  salt    1 tbsp
  garlic  2 cloves
  oil     3 tbsp
  tomato  400 g
  basil   6 leaves

tools
  pot, pan, colander

boiling_water = boil(water) in pot 8min
cooked_pasta  = boil(pasta, boiling_water, salt) in pot 10min
spaghetti     = drain(cooked_pasta) with colander 1min

chopped_garlic = chop(garlic) 3min
soffritto      = sweat(chopped_garlic, oil) in pan @heat:low 5min
sauce          = simmer(soffritto, tomato) in pan @heat:medium 15min
  + basil at 12min

dish = mix(spaghetti, sauce) in pan 2min

serve dish

This is the chart

recipe "Spaghetti with tomato sauce" cooks 1 ingredients pasta 200 g water 2 l salt 1 tbsp garlic 2 cloves oil 3 tbsp tomato 400 g basil 6 leaves tools pot, pan, colander boiling_water = boil(water) in pot 8min cooked_pasta = boil(pasta, boiling_water, salt) in pot 10min spaghetti = drain(cooked_pasta) with colander 1min chopped_garlic = chop(garlic) 3min soffritto = sweat(chopped_garlic, oil) in pan @heat:low 5min sauce = simmer(soffritto, tomato) in pan @heat:medium 15min + basil at 12min dish = mix(spaghetti, sauce) in pan 2min serve dish

The Hands strip below the chart shows when you are busy: 11 of the 25 minutes. The heat and the water do the rest.

Step 6 / 8

What can't wait

In the previous step the pasta was done at minute 19 and waited for the sauce. Pasta that waits gets mushy or sticky. As the author, you say so with no wait on the cooked and the drained pasta.

The scheduler delays the pasta so it arrives right when the sauce is ready. If that were impossible (say, because your hands are busy at that moment), it wouldn't change the recipe: it would mark the wait in red so you can decide.

2 new or changed lines Open this step in the editor ↗
recipe "Spaghetti with tomato sauce"
cooks 1

ingredients
  pasta   200 g
  water   2 l
  salt    1 tbsp
  garlic  2 cloves
  oil     3 tbsp
  tomato  400 g
  basil   6 leaves

tools
  pot, pan, colander

boiling_water = boil(water) in pot 8min
cooked_pasta  = boil(pasta, boiling_water, salt) in pot 10min no wait
spaghetti     = drain(cooked_pasta) with colander 1min no wait

chopped_garlic = chop(garlic) 3min
soffritto      = sweat(chopped_garlic, oil) in pan @heat:low 5min
sauce          = simmer(soffritto, tomato) in pan @heat:medium 15min
  + basil at 12min

dish = mix(spaghetti, sauce) in pan 2min

serve dish

This is the chart

recipe "Spaghetti with tomato sauce" cooks 1 ingredients pasta 200 g water 2 l salt 1 tbsp garlic 2 cloves oil 3 tbsp tomato 400 g basil 6 leaves tools pot, pan, colander boiling_water = boil(water) in pot 8min cooked_pasta = boil(pasta, boiling_water, salt) in pot 10min no wait spaghetti = drain(cooked_pasta) with colander 1min no wait chopped_garlic = chop(garlic) 3min soffritto = sweat(chopped_garlic, oil) in pan @heat:low 5min sauce = simmer(soffritto, tomato) in pan @heat:medium 15min + basil at 12min dish = mix(spaghetti, sauce) in pan 2min serve dish

Now the pasta starts at minute 12 and ends right before mixing. What waits is the boiling water, which doesn't spoil.

Step 7 / 8

Just in time

no wait protects what matters, but everything else still happens as soon as possible. If you'd rather have everything finish right when it is needed, declare it with schedule just_in_time.

It is the recipe author's decision: the chart will be drawn this way wherever it is embedded. Readers can compare with the switch at the top right.

recipe "Spaghetti with tomato sauce"
cooks 1
schedule just_in_time

ingredients
  pasta   200 g
  water   2 l
  salt    1 tbsp
  garlic  2 cloves
  oil     3 tbsp
  tomato  400 g
  basil   6 leaves

tools
  pot, pan, colander

boiling_water = boil(water) in pot 8min
cooked_pasta  = boil(pasta, boiling_water, salt) in pot 10min no wait
spaghetti     = drain(cooked_pasta) with colander 1min no wait

chopped_garlic = chop(garlic) 3min
soffritto      = sweat(chopped_garlic, oil) in pan @heat:low 5min
sauce          = simmer(soffritto, tomato) in pan @heat:medium 15min
  + basil at 12min

dish = mix(spaghetti, sauce) in pan 2min

serve dish

This is the chart

recipe "Spaghetti with tomato sauce" cooks 1 schedule just_in_time ingredients pasta 200 g water 2 l salt 1 tbsp garlic 2 cloves oil 3 tbsp tomato 400 g basil 6 leaves tools pot, pan, colander boiling_water = boil(water) in pot 8min cooked_pasta = boil(pasta, boiling_water, salt) in pot 10min no wait spaghetti = drain(cooked_pasta) with colander 1min no wait chopped_garlic = chop(garlic) 3min soffritto = sweat(chopped_garlic, oil) in pan @heat:low 5min sauce = simmer(soffritto, tomato) in pan @heat:medium 15min + basil at 12min dish = mix(spaghetti, sauce) in pan 2min serve dish

The water no longer starts boiling at minute 0 but at minute 4: it boils right when the pasta goes in, and nothing waits anymore.

Step 8 / 8

Fine details

To finish, a few details that make the recipe more precise:

  • 9-11min until "al dente": a duration that is a range, and a condition to know when it is done.
  • oil[2/3] and oil[1/3]: the oil is split between the soffritto and the end.
  • "Tomato sauce": the displayed name, different from the identifier.
  • The grated cheese: a third lane added halfway through mixing.
  • servings and description in the header.
12 new or changed lines Open this step in the editor ↗
recipe "Spaghetti with tomato sauce"
description "The full recipe from the tutorial"
servings 2
cooks 1
schedule just_in_time

ingredients
  pasta     200 g     "Spaghetti"
  water     2 l
  salt      1 tbsp
  garlic    2 cloves
  oil       3 tbsp    "Olive oil"
  tomato    400 g     "Crushed tomato"
  basil     6 leaves
  parmesan  40 g

tools
  pot, pan, colander

boiling_water = boil(water) in pot 8min
cooked_pasta  = boil(pasta, boiling_water, salt) in pot 9-11min until "al dente" no wait
spaghetti     = drain(cooked_pasta) with colander 1min no wait

chopped_garlic = chop(garlic) 3min
soffritto      = sweat(chopped_garlic, oil[2/3]) in pan @heat:low 5min
sauce "Tomato sauce" = simmer(soffritto, tomato) in pan @heat:medium 15min
  + basil at 12min

cheese = grate(parmesan) 2min

dish "Spaghetti with tomato sauce" = mix(spaghetti, sauce, oil[1/3]) in pan 2min
  + cheese at 1min

serve dish

This is the chart

recipe "Spaghetti with tomato sauce" description "The full recipe from the tutorial" servings 2 cooks 1 schedule just_in_time ingredients pasta 200 g "Spaghetti" water 2 l salt 1 tbsp garlic 2 cloves oil 3 tbsp "Olive oil" tomato 400 g "Crushed tomato" basil 6 leaves parmesan 40 g tools pot, pan, colander boiling_water = boil(water) in pot 8min cooked_pasta = boil(pasta, boiling_water, salt) in pot 9-11min until "al dente" no wait spaghetti = drain(cooked_pasta) with colander 1min no wait chopped_garlic = chop(garlic) 3min soffritto = sweat(chopped_garlic, oil[2/3]) in pan @heat:low 5min sauce "Tomato sauce" = simmer(soffritto, tomato) in pan @heat:medium 15min + basil at 12min cheese = grate(parmesan) 2min dish "Spaghetti with tomato sauce" = mix(spaghetti, sauce, oil[1/3]) in pan 2min + cheese at 1min serve dish

The cheese has its own lane and goes in at minute 1 of mixing. Hover any step to see its time window, what it uses and what it produces.

You now know most of the language

A few pieces are left for more advanced cases: limited burners, tools that change state (preheating the oven), named blocks and vocabulary packs. They are in the specification. Meanwhile, open the final recipe in the editor and make it your own.