Recipe & SOP System | 食谱与 SOP 系统 Interactive demo | 互动演示

A data model for recipe and SOP operations餐厅食谱与 SOP 系统的数据模型

01

The model itself资料模型本身

Recipes, dishes, sub-recipes, ingredients, versions and approval states are represented by the objects below. Two layers first.食谱、菜品、子配方、原料、版本与审批状态,都由下面这些物件组成。先从两个层级开始。

Bought in | 买进来的 Ingredients 原料

Supplier, pack, unit, allergens printed on the packaging. The kitchen doesn't make these — it uses them.

Made in-house | 自己做的 Recipes 食谱

Ingredient list + method + yield. Marked either sub-recipe (referenced by others) or dish (what leaves the pass). Same structure either way.

Why they must stay apart:为什么必须分开:把这两层分开不是为了整齐,是为了下面这件事:

Dish 菜品Roasted Chicken | pepper sauce | squash⚠ dairy · sesame — via pepper sauce 经由甜椒酱
Ingredient 原料Chicken 鸡肉
Sub-recipe 子配方roasted pepper sauce⚠ dairy · sesame — from its ingredients 来自其原料
Ingredient 原料Roasted peppers 烤甜椒
Ingredient 原料Yogurt 优格⚠ dairy · 乳制品
Ingredient 原料Tahini 芝麻酱⚠ sesame · 芝麻
Sub-recipe 子配方Purée 泥状配件⋯ own ingredients · 各有自己的原料
Sub-recipe 子配方Pickle 腌渍配件⋯ own ingredients · 各有自己的原料
Sub-recipe 子配方Pickling liquor 腌渍底液another level down · 又一层⋯ own ingredients · 各有自己的原料
Sub-recipe 子配方Garnish 装饰配件⋯ own ingredients · 各有自己的原料

Illustrative data only. All recipe, dish and ingredient names on this page are fictional examples created to demonstrate the system structure.仅为示意资料。本页所有食谱、菜品与原料名称均为虚构示例,仅用于说明系统结构。 Only the roasted pepper sauce is opened up here — every sub-recipe has its own ingredient lines; expanding them all would make the diagram unreadable. 这里只展开了甜椒酱——每一份子配方底下都有自己的原料行,全部展开会让图表难以阅读。

Why the layers matter为什么要分两层

The roasted pepper sauce record lists yogurt and tahini — written down once, when that recipe was created. The roasted chicken recipe simply references the sauce; nobody rewrites its contents on every dish that uses it.甜椒酱资料中会记录优格和芝麻酱——在配方建立时记录一次即可。烤鸡配方只需引用甜椒酱,不需要在每一道使用它的菜中重复抄写。

At service time, the station card still displays dairy and sesame because the system follows the recipe relationships, collects the verified allergen data and carries it back up. The result is traced through the recipe rather than left to memory.到了出餐时,工作站卡片仍会显示乳制品与芝麻,因为系统会沿着配方关系收集已核实的过敏原资料,再逐层带回上层。结果来自系统追溯,不依赖员工记忆。

Ten objects and their fields十个物件和它们的字段

ObjectFields in scope 本次字段Rule that matters
Ingredient name · aliases (scallion / spring onion) · category · base unit · unit conversions incl. density · supplier & pack · allergens · allergens_verified · verification source · trim/yield loss · status Allergens are derived from here, never guessed from recipe text.过敏原从这里推导,绝不从食谱文字猜。未核实 → 所有用到它的食谱全部卡住。 Not verified → every recipe using it is blocked.
Recipe code · name · role: dish | sub-recipe · section/station · created · archived Permanent facts only.只放永远不变的东西。配料、做法、产出量都不在这里——否则改一次食谱就等于改掉它自己的全部历史。 No ingredients, no method, no yield here — otherwise editing a recipe would silently rewrite its own history and "approved is frozen" would be false.
Recipe
version
version no. · status · yield qty + unit · portions & portion size · method steps (ordered) · equipment · storage · shelf life · plating photo & notes (optional) · missing_fields state · change reason · created/reviewed/approved by · approved date · effective date · source (photo / audio / transcript / extraction run) The only place content lives. Approved = frozen;内容的唯一归属地。批准即冻结,改动产生新版本,旧版保留。产出量必填——被引用时的换算基准。 changes create a new version and the old one is kept. Yield is mandatory — it's the conversion basis whenever this recipe is referenced by another.
Recipe
line
position · type: ingredient | recipe · target · binding: follow current approved | pinned · pinned version · quantity + unit · prep note · prep loss % · optional One row per line of a version.版本底下的每一行。它指向的是那个子配方,不是它的某一版——由引用规则决定跟不跟随。这一行就是十二道菜那题的全部答案。 It points at the sub-recipe, not at one of its versions — the binding field decides whether it follows. This row is the whole twelve-dishes answer.
Dependency ancestor recipe · descendant recipe · depth Maintained automatically. Answers "what uses this" instantly, blocks circular references, and finds every downstream item when something changes.系统自动维护。秒答「什么用到了它」、阻止循环引用、变更时找出全部下游。
Impact
record
source version · affected version · materiality: allergen | yield | method | cosmetic · allergen delta · yield delta · resolution · resolved at Generated automatically the moment a sub-recipe is approved.子配方一批准就自动生成一批。这是审核队列的输入。 This is what feeds the review queue.
Review
task
target version · type: new import | edit | upstream change · triggering version · assigned role & person · state · opened / closed · decision Where approval routing actually lives.approval routing 真正落地的地方。没有它,审核队列只是一个筛选视图——没法指派,也没法追踪。 Without it the review queue is only a filtered view — nothing to assign, nothing to chase.
Venue /
SOP doc
category · title · version · approval status · linked recipes · publish target An output document generated from approved content由已批准内容生成的输出文件——不是第二个要另外维护的资料库。 — not a second, separate library to maintain.
Audit log entity · actor · timestamp · action · before · after Append only.只增不改。「哪一版、谁批的、哪天」最后的凭据。 The final evidence for "which version, approved by whom, on what date".
RecipeName + role.
Nothing else.名称与角色,别的都不放
1 : N
VersionAll the content.
Frozen once approved.全部内容;批准即冻结
1 : N
Recipe lineQuantity + binding:
follow or pinned.用量 + 引用规则
points at
Ingredient
or Recipe ↺
Pointing back at a recipe is what creates nesting.指回配方,就形成巢状

The key field: binding, on the recipe line. Everything in section 02 depends on it.关键字段:配料行上的「引用规则」。第 02 节的逻辑都依赖它。

Approval states审批状态

Draft 草稿→ In review 审核中→ Approved 已批准→ Published 已发布→ Superseded 已停用
└Needs info 缺资料 A draft missing allergens, shelf life or yield sits here instead, and cannot be sent for review at all until it is completed.缺过敏原、保质期或产出量的草稿会停在这里,补齐之前根本送不出去审核。
These states belong to a version, not to the recipe. Editing an approved recipe never sends it backwards — it opens a new version starting at Draft, while the published one stays live in the kitchen until the new one is approved. A recipe can therefore hold a published v2 and a draft v3 at the same time.这些状态属于「版本」,不属于「食谱」。改一份已批准的食谱,永远不会把它退回去——而是另开一个从草稿开始的新版本,在新版批准之前,已发布的那一版继续在厨房有效。所以一份食谱可以同时有一个已发布的 v2 和一个草稿的 v3。
02

The version rule版本规则

One rule, three parts. This is the recommended version-control pattern for keeping published kitchen instructions stable.一条规则,三个部分。这套版本控制方式能让厨房正在使用的内容保持稳定。

roasted pepper sauce — version history 版本历史
v1SUPERSEDED 已停用
Previously approved and published. Kept exactly as approved — never edited, never deleted.先前已批准并发布。原样保留——不会被修改或删除。
↓ chilli reduced — the published v1 is not touched; a new draft opens↓ 辣椒减量——已发布的 v1 不动,开一份新草稿
v2APPROVED · PUBLISHED 现行
Approved and published. This is what the kitchen is working from now. v1 became superseded only after v2 went live.这一版已经批准并发布,是厨房目前使用的版本。只有在 v2 生效后,v1 才转为已停用。
↓ someone is editing again↓ 又有人在改
v3DRAFT 草稿
Being worked on. Invisible to the kitchen. The team stays on v2 until v3 is approved.仍在编辑,厨房看不到。v3 批准前,团队继续使用 v2。

Nothing is ever overwritten. Editing an approved recipe does not change it — it opens the next version. That is what makes “which version was the kitchen using on the 20th” a question with an answer.没有任何东西会被覆盖。改一份已批准的食谱不会改到它本身,而是开出下一个版本。正因为这样,「20 号那天厨房用的是哪一版」才是一个答得出来的问题。

1Sub-recipe v4 approvedAn authorised reviewer approves a change to a shared sub-recipe.授權審核者批准了共用子配方的改動
2System finds usersEvery dish holding v3 is located automatically.系统自动找出所有还在用 v3 的菜
3A draft per dishEach gets a new draft showing the change.每道菜生成一份新草稿,标出改动
4Approval decisionPublished documents only change after approval.只有審核通過後,已發布文件才會更換
Rule 规则What it means 意思是
Approved documents
are pinned
A published recipe holds the exact sub-recipe versions it was approved with. Nothing inside a document the kitchen is working from changes on its own.已批准的文件固定住批准时用的那些子配方版本。厨房正在用的文件,内容绝不会自己变。
An update creates
drafts, not changes
When a sub-recipe is approved, the system finds every affected dish and opens a new draft for each, showing what changed. The team can approve them in one pass instead of hunting for them.子配方批准後,系統會找出每一道受影響的菜,並分別建立新草稿,同時標出改動,讓團隊一次完成審核。
Allergen changes
need confirmation
If an allergen appears or disappears, the affected published documents are flagged immediately and cannot be replaced until an authorised reviewer has reviewed each one.過敏原一旦增減,受影響的已發布文件會立即標記,並須由授權審核者逐份確認後才能更換。
Why this way为什么这样定

The system does the finding and the drafting, but nothing reaches the kitchen that a person hasn't approved. A dish can also be held back deliberately to run out an existing batch.找下游、生成草稿都由系统做,但没有任何东西会在没人批准的情况下到达厨房。某道菜也可以刻意不跟进,把现有那批用完。

03

What happens when a sub-recipe used in twelve dishes changes一个被十二道菜使用的子配方改了,会怎样

Two clickable cases show how a shared sub-recipe change moves through the system.下面两个可点击情境,展示共用子配方变更后,系统如何处理影响范围。

Illustration only. All menu names, recipe relationships and scenarios are fictional sample data.仅为演示。所有菜名、配方关系与情境均为虚构示例资料。

roasted pepper sauce Sub-recipe 子配方 v3 · current Roasted pepper, yogurt, tahini, garlic, lemon · carries dairy + sesame
Sample menu — 12 dishes | 示例菜单 · 12 道
What changed 改了什么What the system does 系统怎么做
An allergenPublished documents are flagged and held. Each affected dish is reviewed individually before anything is replaced.已发布文件挂标记并暂停替换。每一道受影响的菜逐份过目。
Method or yieldA new draft per affected dish, change shown. Approve in one pass.每道受影响的菜生成新草稿,标出改动,一次性批准。
Ingredient quantitySame — drafts, with quantities recalculated where the yield moved.同样生成草稿;产出量有变的,用量自动重算。
Wording onlyDrafts too, flagged as cosmetic so they can be accepted in bulk.也生成草稿,但标为纯文字,可批量接受。
04

What the AI is allowed to doAI 被允许做什么

Critical information such as allergens, shelf life and operating instructions must be correct. The system therefore refuses rather than guesses when source material is incomplete.过敏原、保存期限与操作说明等关键资料必须正确。因此,当原始资料不完整时,系统会选择拒绝猜测。

Worked example. This fictional prep sheet shows what the system can transcribe and what it must leave for a person to confirm.虚构操作示例。这张备料单用来说明系统能够转录什么,以及哪些资料必须由人员确认。

Example photo in | 示例照片 · 手写
Roasted pepper sauce
red pepper 1kg
yogurt 400g
tahini 150g
garlic 80g
lemon juice a little

blend until smooth
check seasoning
Draft out | 草稿出来
Name 名称Roasted pepper saucetranscribed 照抄
Ingredients 配料Red pepper 1kg · yogurt 400g · tahini 150g · garlic 80g红甜椒 1kg · 优格 400g · 芝麻酱 150g · 蒜 80gtranscribed 照抄
Lemon juice "a little"left as written 原样保留 — 需要一个数字
Method 做法1. Blend until smooth 2. Check seasoning1. 搅打至顺滑 2. 检查调味split into steps only — never adds a step that wasn't written 只拆步骤 · 绝不添加纸上没有的工序
Yield 产出量— not on the sheet · 纸上没写blocks approval 阻断批准
Shelf life 保质期— not on the sheet · 纸上没写blocks approval 阻断批准
Allergens 过敏原Dairy (yogurt) · sesame (tahini)乳制品(优格)· 芝麻(芝麻酱)— 从原料资料推导,不是从纸上读取 ← derived from ingredient records, not read off the sheettahini record not yet verified 芝麻酱资料尚未核实

So it cannot publish. One unverified ingredient blocks every recipe that uses it.所以這份食譜無法發布。它會停留在草稿,直到三項資料補齊:實際產量、保存期限,以及芝麻醬資料的核實者。一項未核實的原料,會暫停所有使用它的食譜——確保每一項過敏原資訊都有明確負責人。

Trigger 触发Any single ingredient in a recipe has unverified allergen data一份食谱里,任何一样原料的过敏原资料未经核实
Blocked 阻断That recipe cannot enter review · cannot be approved · cannot publish这份食谱不能送审 · 不能批准 · 不能发布
Routed 分流The ingredient goes to a verification queue with a named owner该原料进入待核实清单,指定负责人
Released 解除Once verified, every blocked recipe unblocks automatically核实完成后,被卡住的食谱自动全部解冻
An ingredient counts as verified in one of three ways: a supplier specification, the packaging, or a named team member's confirmation recorded with the date.
If a small supplier provides no declaration, one authorised person can take responsibility and the system records who confirmed the information and when.原料资料可通过三种方式核实:供应商规格、包装标示,或由指定团队成员确认并记录日期。
若小型供应商没有提供正式声明,可由一位获授权人员负责确认,系统会记录确认者与日期。
05

Who can see, edit and approve谁能看、谁能改、谁能批准

The approval route defines who can create, review, approve and publish each version.审批流程会清楚定义每个版本由谁建立、审核、批准与发布。

Role 角色Can see 能看Can edit 能改Can approve 能批准
AdminAll recipes and versions全部食谱与版本People, categories, settings人员、分类、系统设置Manages publishing rights管理发布权限
Head chefDrafts, review queue, history, impact lists草稿、审核队列、历史、影响清单Correct or reject anything修正或退回任何内容Yes — including the effective date可以,含生效日期
Recipe editorTheir own scope and its history负责范围及其历史Create and edit drafts建立与修改草稿No
ManagerVersions in force, plus change notices现行版本与变更通知Not in this project本次不开放Acknowledge receipt only仅确认已收到
KitchenThe current approved version当前批准版NoNo
06

What it looks like in use用起来大概长这样

Indicative layout only. Sketched to show what each person deals with day to day — not a design proposal, and not what the finished screens would look like.仅为示意排版。画出来是为了说明每个人每天面对什么,不是设计方案,也不是成品的样子。

REVIEW QUEUE — 审核队列Chef 主厨
Duck jus v5 → 3 dishes ■ ALLERGEN CHANGED · HELD 过敏原变更 · 已冻结
Roasted pepper sauce v4 ⚠ SHELF LIFE MISSING 缺保质期
Pickling liquor v3 → 4 drafts ready ◆ UPSTREAM UPDATE · APPROVE TOGETHER 上游更新 · 可一次批准
Roasted chicken — from photo 2 QUANTITIES UNCLEAR 2 处分量待确认
STATION CARD — 出菜口Kitchen 厨房
Roasted Chicken v7 · approved
Allergens 过敏原Dairy · Sesame 乳制品 · 芝麻
Yield12 portions 12 份 Shelf life3 days, chilled 冷藏 3 天 UsesRoasted pepper sauce v4 · Squash purée v2
1 · Cure overnight, rinse, pat dry.
2 · Confit 4 h at 82 °C.
3 · Press, portion, crisp to order.
The two things worth noticing: the chef only ever sees what needs a decision, and the kitchen card carries a version stamp and the allergens at the top — so what is on the pass is always traceable to a version someone approved.两个值得注意的点:主厨只会看到需要他做决定的东西;出菜口那张卡带着版本号,过敏原放在最上面——出菜口用的是哪一版、谁批的,永远查得到。