Skip to content
C.W.K.
Lesson 02 of 05 · published

Five Siblings, One Principle

~15 min · worked-example, principle, roles, siblings

Level 0Mise en Place
0 XP0/43 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete

One root class

The design's worked example is gambas al ajillo, prawns cooked in garlic-scented olive oil. Its root class fits in one sentence: move aroma into fat first, then cook in that fat. That is a principle in Sizzle's sense. It is named by what it does, never by a dish, and it works for a reason you can say at the stove.

Here is the reason. Many of the aroma compounds in garlic, chili and scallion dissolve far more readily in fat than in water, and gentle heat draws them out of the aromatic and into the oil. The second step puts the main ingredient into that oil, so every surface the fat touches comes out coated in flavor. The order is the whole technique. Add the garlic at the end and you get garlic pieces sitting in plain oil.

The sentence also has an interface. It needs something aromatic, a fat to receive the aroma, a main ingredient that cooks in the fat, and heat. Sizzle's reading rubric uses exactly those role names as its example: 향채 (aromatic), 기름 (fat), 주재료 (main ingredient), 열 (heat). Bind the slots differently and the same class gives you a different dish.

Five siblings

The architecture doc lists five siblings and sums the set up as five cuisines, one principle:

DishAromaticFatWhat cooks in it
Gambas al ajillo (Spain), the root examplegarlic, dried chiliolive oilprawns
Aglio e olio (Italy)garlic, chili flakesolive oilspaghetti, tossed in the oil
Mushroom ajillo (Spain again)garlicolive oilmushrooms
Scallion-oil fried rice (Korea)scallionneutral oilcooked rice
Chinese stir-fry aromatics, 爆香 (bàoxiāng)ginger, garlic, scallionhot wok oilwhatever goes in next
Sofrito, the paella base (Spain)onion, garlic, tomatoolive oilthe rice, stirred in before the stock

Read the table down each column and the class shows itself. The fat barely changes. The aromatic changes with the cuisine. The main ingredient changes with the meal. The two steps never change.

Principle: A sibling binds the same roles with different values. Looking alike has nothing to do with it.

The worked example as data

The doc then walks the example through Sizzle's objects. Here it is with the place names taken out:

  1. A photo from a tapas bar becomes an Encounter.
  2. Its Reading names gambas al ajillo with high confidence, notes guindilla chili with medium confidence (the red flakes could be pimentón), and links the proposed principle about aroma and fat.
  3. The cook adopts the principle and corrects the chili.
  4. The principle's page lists aglio e olio and scallion-oil fried rice as inferred siblings.
  5. Later the dish is made at home with perilla oil. That photo becomes a second Encounter, cooked at home, tied to a Variant that overrides the fat. The lineage reads Tapas-bar gambas → Perilla-oil gambas.

Treat it as a design illustration. It puts every object into one story: an instance captured, a class proposed, a correction that outranks the model, siblings that stay inferences until a plate is linked to one, and an override that keeps the class while changing a single role.

The test suite cooks it too

The engine's tests use the same example, so you can see it as the data a reading really returns. The fake Pippa in backend/tests/conftest.py answers every reading with one gambas plate: three bindings (garlic as 향채, olive oil as 기름, prawns as 주재료), one principle named by what it does, two siblings, and one honest doubt about the chili. The principle's why is the chemistry in a line: garlic's aroma compounds are fat-soluble, so they dissolve well in oil.

The first tree test checks what the design promised. After one reading the tree holds one principle, still proposed. The gambas is encountered, because a captured plate is linked to it. The doc glosses that as proof Dad ate it, but the query doesn't ask what kind of plate it was, so one seen at a market counts too. Only a home plate makes a dish cooked, and Track 2 comes back to that gap. Aglio e olio is inferred, because Pippa derived it and no plate is linked to it yet. Scallion-oil fried rice sits in the tree under its Korean name. Track 2 opens those objects and Track 4 follows how they grow, so here only the shape matters: one photo, one class, siblings across cuisines.

oo-quest's Track 4 has its own section on polymorphism across cuisines. There the shared structure is a set of flavor axes: a salt source, a fat source, an umami vehicle. Here it is a technique with roles. Read both and you have two decompositions of one kitchen.

Code

cwkSizzle, backend/tests/conftest.py: the fake reading every engine test receives, the worked example as data (verbatim, lines 24-60)·python
GAMBAS = {
    "summary": "마늘과 고추를 넣은 올리브유에 새우를 익힌 감바스 알 아히요 한 접시.",
    "dishes": [
        {
            "name_original": "Gambas al ajillo",
            "name_ko": "감바스 알 아히요",
            "cuisine": "스페인 안달루시아",
            "confidence": "high",
            "evidence": "토기 그릇의 기름, 마늘 조각, 새우",
            "dish_ref": "",
            "techniques": [{"name": "기름에 향 우리기", "confidence": "high"}],
            "bindings": [
                {"role": "향채", "value": "마늘", "confidence": "high"},
                {"role": "기름", "value": "올리브유", "confidence": "high"},
                {"role": "주재료", "value": "새우", "confidence": "high"},
            ],
            "principles": [
                {
                    "ref": "",
                    "name": "향을 기름에 먼저 옮기고 그 기름에서 익히기",
                    "summary": "향채의 향을 기름에 먼저 녹인 뒤 그 기름으로 주재료를 익힌다.",
                    "why": "마늘의 향 성분은 지용성이라 기름에 잘 녹는다.",
                    "roles": [{"role": "향채", "examples": ["마늘", "파"]}],
                    "method": ["약불에서 향채를 기름에 우린다", "주재료를 넣고 익힌다"],
                    "confidence": "high",
                }
            ],
            "siblings": [
                {"name_original": "Aglio e olio", "name_ko": "알리오 올리오", "cuisine": "이탈리아",
                 "principle": "향을 기름에 먼저 옮기고 그 기름에서 익히기", "why_same": "마늘 기름에 파스타를 버무린다"},
                {"name_original": "파기름 볶음밥", "name_ko": "파기름 볶음밥", "cuisine": "한국",
                 "principle": "향을 기름에 먼저 옮기고 그 기름에서 익히기", "why_same": "파 향을 낸 기름에 밥을 볶는다"},
            ],
        }
    ],
    "unsure": ["빨간 조각이 기닐라 고추인지 피멘톤인지 확실하지 않아."],
}
cwkSizzle, backend/tests/test_tree.py: one reading yields a proposed principle, an encountered dish and inferred siblings (verbatim, lines 11-23)·python
def test_a_reading_grows_the_tree_with_evidence(make_client, fake_pippa):
    client = make_client()
    encounter_id = capture(client, "req-tree-001")["encounter"]["id"]
    body = _read(client, encounter_id)
    assert body["view"]["unsure"], "doubts are carried, not hidden"
    tree = client.get("/api/tree").json()
    assert len(tree["principles"]) == 1
    principle = tree["principles"][0]
    assert principle["status"] == "proposed"
    by_name = {d["name"]: d for d in principle["dishes"]}
    assert by_name["Gambas al ajillo"]["evidence"]["status"] == "encountered"
    assert by_name["Aglio e olio"]["evidence"]["status"] == "inferred"
    assert "파기름 볶음밥" in by_name

External links

Exercise

Choose a technique you already cook by feel, such as a braise, a quick pickle or a roux. Write it as a principle: one sentence on what it does, one on why it works, and its roles. Then find three siblings from three different cuisines and fill a table with the dish, the value bound to each role, and what stays fixed. If a candidate needs a role your principle lacks, decide whether it has a second parent or belongs to a different class.
Hint
Test each role by substitution. If swapping the value keeps the dish recognizably in the family, you named a role. If the swap breaks the technique, you named part of the method. A dish may inherit from two principles; Sizzle's rubric allows one root principle per dish, two at most.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign in — Please sign in to comment.

No comments yet — be the first.