gram/docs/features/README.md

1.6 KiB

GRAM Features & Calculations

This directory documents the advanced logic of the GRAM ecosystem. Features are divided between core recipe compilation (@gram/compiler) and physical/macro analysis (@gram/analyzer).

Contents

🧑‍🍳 Core Compiler Features (@gram/compiler)

  • Shopping List Generation

    • The complex logic behind merging ingredients across recipe sections.
    • Handling of alternative ingredients (A | B).
    • Resolving Composite Ingredients (Driver/Passenger MAX rule).
    • Ghost Reference detection.
  • Time Metrics & Scheduling

    • Active Labor Time vs Total Elapsed Time.
    • Asynchronous Background Tasks scheduling (e.g., rising, marinating).
    • Retro-planning syntax and calculation.
    • Automated Preparation Time (Mise en place) estimation.

🧪 Physical Analyzer Features (@gram/analyzer)

  • Mass Normalization

    • How quantities (cups, tbsp, counts) are resolved into grams to enable unified mass calculation.
    • Density database resolving and custom Frontmatter overrides.
  • Yield Management

    • Distinguishing between Net Mass (what goes in the pot) and Purchasing Mass (Gross Mass - what you actually buy).
    • Waste factor calculation rules.
  • Nutritional Estimation

    • Automatic calculation of calories and macronutrients (Protein, Carbs, Fat, Sugar, Fiber, Salt) per recipe and per portion.
    • Database resolution coverage and warning triggers.