← ARC composition Self-contained · No dependencies

Worked composition

A checked lunch order

Three small ARCs answer bounded questions. Their checked outputs become data for a larger ARC that decides what to order—and checks the whole composition against the original need.

Inputs

Three focused child ARCs

ARC A · DemandCheck passes

How many slices do all guests need?

36 slices

Reason
18 × 2 = 36
Check
The attendee allocation also totals 36.
Output
slice demand → parent data
ARC B · PackageCheck passes

How many slices does one pizza provide?

8 slices

Reason
The selected menu item is cut into equal slices.
Check
Capacity is a positive whole number.
Output
pizza capacity → parent data
ARC C · DietaryCheck passes

How many slices must be gluten-free?

4 GF slices

Reason
2 × 2 = 4
Check
GF guests are a subset of all guests.
Output
GF demand → parent data

Larger composed ARC

Parent ARC · Order4/4 checks pass

What is the smallest lunch order that covers everyone?

Order 5 pizzas: 1 gluten-free + 4 regular.

Reason
The three checked child answers determine demand, package capacity, and dietary allocation.
Checks
The parent runs four separate checks against both the child contracts and the original inputs.
3/3 child contracts valid
40 slices ≥ 36 needed
8 GF slices ≥ 4 needed
4 pizzas would be too few

Why this is composition: each child owns one question and check; the parent consumes only their explicit outputs, then verifies the combined result end to end.