Skip to content

Plan a meal

You want to serve a pistachio and raspberry entremets on Saturday at 8 p.m. It needs three days of work, a sponge and an insert made two days before, a glaze you may already have in the freezer, and you can cook between 8 a.m. and 10 p.m. This guide shows you how to turn a recipe into an actionable plan to follow in the kitchen or integrate into your calendar.

The recipe says how to do things. The run sheet says when to come and what to take out. Gram computes it directly from the recipe, so there is nothing to write twice.

  1. Write the waits as ranges and anchor the days

    Section titled “Write the waits as ranges and anchor the days”

    A wait written as a range (~_{12-72h}) provides flexibility that Gram uses to adapt to your availability. A day anchor (@use "..." as &sponge ~{-2d} or ## Mousse ~{-1d}) specifies the day on which a section or sub-recipe should be made.

    ---
    title: Pistachio raspberry entremets
    portions: 6
    ---
    
    @use "./bases/pistachio-sponge.gram" as &sponge ~{-2d}
    @use "./bases/raspberry-insert.gram" as &insert ~{-2d}
    @use "./bases/white-chocolate-glaze.gram" as &glaze
    
    ## Mousse ->&mousse ~{-1d}
    
    [Whip] Whip @cream{250g} with @sugar{30g} and @milk{100g} using the #stand mixer{} for ~{10min}.
    
    [Layer] The &sponge, &insert and mousse in the #ring{}(20 cm), then freeze for ~_{12-48h}.
    
    ## Finish
    
    [Unmould] Unmould the entremets and glaze with &glaze.
    
    [Thaw] Thaw in the fridge for ~_{6h}.
    The three bases this recipe imports
    ---
    title: Pistachio sponge
    ---
    
    ## Sponge ->&sponge
    
    [Mix] Mix @pistachios{80g}, @eggs{3} and @sugar{60g}.
    
    [Bake] Bake at ^{350°F} for ~{12min}.
    ---
    title: Raspberry insert
    ---
    
    ## Insert ->&insert
    
    [Cook] Cook @raspberries{200g} and @sugar{40g} for ~{5min}.
    
    [Freeze] Freeze for ~_{12-72h}.
    ---
    title: White chocolate glaze
    ---
    
    ## Glaze ->&glaze
    
    [Heat] Heat @white chocolate{150g} and @cream{100g} for ~{5min}.

    The durations and times shown below are the ones Gram computes with these three bases.

    See Exact times and ranges and Days and hours.

  2. Not sure which day or time works best? Let Gram test your regular meal times over a target period:

    gram plan entremets.gram --find 2026-10-15/2026-10-19 --meal-times 12:30,20:00 \
      --tz Europe/Paris --available 08:00-22:00
    Thursday, October 15 20:00 — start Tue 13:37 · 3 visits to the kitchen · no wait adjusted
    Friday, October 16 20:00 — start Wed 13:37 · 3 visits to the kitchen · no wait adjusted
    Saturday, October 17 20:00 — start Thu 13:37 · 3 visits to the kitchen · no wait adjusted
    ...
    Thursday, October 15 12:30 — not possible. Mise en place — Sponge, around Tue 06:05, falls when you are not available, and no wait can be moved to fix it. (+2)

    Compatible options are listed first (prioritizing fewer adjusted waits, then fewer visits, then the earliest dates). For each incompatible slot, Gram explains the blocking constraint.

    The --meal-times flag replaces the default (12:30,20:00). To configure your preferred meal slots permanently, set the mealTimes list in .gram/config.yaml.

  3. Once you have chosen your serving time, ask Gram to compute the full schedule:

    gram plan entremets.gram --serve "2026-10-17 20:00" --tz Europe/Paris --available 08:00-22:00 \
      --stock ./bases/white-chocolate-glaze.gram
    • --serve: the target date and time of the meal.
    • --available: when you can cook (repeatable, e.g. sat=09:00-23:00, 2026-10-09=none). Your usual hours can be saved once for the project via gram config set availability 08:00-22:00; the flag then only overrides them.
    • --tz: your IANA time zone (can be saved permanently via gram config set timezone Europe/Paris).
    • Times can also be written in 12 hours: --serve "2026-10-17 8:00 pm", --available 8am-10pm. The run sheet writes them the way your system’s region does; --clock 12h or --clock 24h picks one, and gram config set clock 12h keeps it for the project.
    • --stock: indicates that a preparation (here the glaze) is already made in your freezer. Gram does not schedule it and flags it as “in stock”. The value is the @use path exactly as written in the recipe, relative to the folder you run the command from (not to the recipe’s folder): run gram plan from the folder that holds entremets.gram.
    Run sheet — Pistachio raspberry entremets
    For Saturday, October 17 at 20:00 · 6 portions
    3 days · 3 visits to the kitchen · 45min of work in all
    
    THU 15   ▮ 13:35 – 14:00 Sponge, Insert
             ┆ Insert : Freeze 12h to 3d
    FRI 16   ▮ 13:40 – 14:00 Mousse
             ┆ Mousse : Layer 12h to 2d
    SAT 17   ▮ 13:55 – 14:00 Finish
             ┆ Finish : Thaw 6h
             ★ 20:00         Serve

    The glaze, in stock, appears in no visit. Times are rounded to five minutes.

  4. The output consists of two complementary parts:

    Summarizes the entire schedule: each active visit to the kitchen (▮), the underlying passive resting times (┆), and the service moment (★).

    Each visit has its own actionable checklist, grouped under the day it falls on:

    • Mise en place: everything to measure and set up before starting tasks:
      • Raw ingredients: check off each ingredient as you weigh it. When mass standardization is active, volume quantities also display their gram equivalent (flour 2 cup · 260.3 g).
      • Intermediate preparations: components made during an earlier visit (Sponge, made Thursday) or stocked items (glaze, in stock).
      • Cookware: listed once per visit with quantity and size (tart tin (24cm), tray ×2).
      • Layout: organized by section (default), per working day (per-day), or upfront (upfront), following your mise en place mode.
    • Execution: the steps of each section, written out as in the recipe and numbered the same way, with their action, temperatures and timers, and the time the section starts (Start: 13:40).
    • Before leaving: passive processes that continue unattended, and the exact time of your next kitchen visit.
    • Possible from… / Can’t start earlier: shows how early this visit could start without affecting the rest of the schedule.
    • Adjusted waits: any passive rest that the scheduler shortened or lengthened to fit your available hours is reported at the top of that day.
    FRIDAY, OCTOBER 16  13:40 → 14:00
      Possible from 08:00.
      MOUSSE (Start: 13:50)
        Mise en place
          [ ] cream 250 g
          [ ] sugar 30 g
          [ ] milk 100 g
          [ ] Sponge, made Thursday
          [ ] Insert, made Thursday
          [ ] stand mixer
          [ ] ring (20 cm)
        Execution
          1. [Whip] Whip cream with sugar and milk using the stand mixer for 10 min.
          2. [Layer] The sponge, insert and mousse in the ring, then freeze for 12-48 h.
      BEFORE LEAVING
        Mousse : Layer 12h to 2d, until 02:00
      Next visit: Saturday 13:55

    This example is in per-section mode (the default): the section is a station, with its mise en place above its steps. In per-working-day mode, one block at the top of the visit gathers the ingredients of every section of the day.

    In “Before leaving”, until 02:00 is the time the wait can end at the earliest (14:00 + 12 h), not the time it stops: the mousse must come out of the freezer before the finish, on Saturday. In between it stays in the freezer about 24 h, within its 12 to 48 h range.

    Any constraints the engine could not resolve (a start time already in the past, work outside your available hours, or an incompatible rest) are listed under “To fix” at the top. See Diagnostics and unresolved constraints.

  5. You can easily use this plan in the kitchen or export it to your workflow tools:

    # Print the run sheet
    gram print entremets.gram --view run-sheet --serve "2026-10-17 20:00" --available 08:00-22:00
    
    # Export the run sheet to Markdown (entremets.run-sheet.md)
    gram export entremets.gram --view run-sheet --format md --serve "2026-10-17 20:00"
    
    # Export visits to an iCalendar file
    gram plan entremets.gram --serve "2026-10-17 20:00" --available 08:00-22:00 --ics entremets.ics
    • Print layout (--view run-sheet): generates the run sheet instead of the recipe with gram print or gram export (formatted with one day per page and checkboxes). You can still print or export the recipe separately to keep both references handy.
    • Electronic calendar (--ics <file>): writes one calendar event per kitchen visit, with a reminder alarm and task/ingredient checklists in the description. Events are in UTC and your calendar displays them in your local time zone.
    • Data formats (--format): use --format md for Markdown note-taking tools, --format html for a standalone web snippet, or --format json to inspect the structured data object ({ plan, runSheet }, see Data formats). Text strings follow your project’s configured language.

A schedule is not a frozen state: it is dynamically computed from the constraints you provide.

If a visit takes longer than expected or your day gets shifted, simply run gram plan again with a slightly later serving time, or use --find to re-evaluate viable slots starting from the current moment.

In the online studio, open the settings and their “Schedule” section, then enter a serving time, time zone, and your availability:

  • The Run sheet view instantly displays the schedule with real dates and times.
  • The “When to serve?” buttons test and propose optimal meal slots.
  • The “Ready as early as” button calculates the fastest serving time starting right now.
  • The format menu above the view shows the run sheet as HTML, Markdown or plain text, ready to copy into notes or a message.
  • The Print button opens the run sheet in its print layout, to print it or save it as a PDF.
  • The Time format menu, in the “Display” section, writes the times in 12 hours (8:00 PM) or 24 hours (20:00); on automatic, it follows your browser’s region.

You can also integrate the scheduling engine directly into your TypeScript applications:

import { compile } from '@gram-lang/kitchen';
import { project, runSheet } from '@gram-lang/scheduler';
import { runSheetToText } from '@gram-lang/renderer';

const compiled = compile(ast);
const context = {
  serveAt: '2026-10-17T20:00',
  timeZone: 'Europe/Paris',
  availability: { daily: [{ start: '08:00', end: '22:00' }] },
};
const plan = project([{ graph: compiled.tasks, title: compiled.title ?? undefined }], context);

// By providing both the task graph and context, each visit gets its computed margin.
const sheet = runSheet(plan, { graph: compiled.tasks, context });
console.log(runSheetToText(sheet, compiled));

The plain text output above is only one presentation layer: the scheduler produces a rich data model. To build custom graphical components, see Build a custom UI.