Flat recursion — a resource is a leaf
ImageThe deferred-scope guard for E4c. Generating a required resource fills its node and stops. The per-resource compose-preview is a leaf: it emits a prompt + guide only — never its own nested requiredResources. Nested sub-generation and re-planning the whole set stay deferred.
One level deep, always. The actionable checklist (page 02 / 03) lets you generate each required resource on platform. But a generated resource is a leaf of the tree — it can never sprout its own checklist. Below: what E4c ships (flat) vs. the recursive shape we explicitly defer.
What E4c ships
E4c — FLAT
Generate → fills the node
A product resource is needed. You generate it on-platform; the result drops straight into the node, which flips to have. Done. The compose-preview that produced it was a leaf.
Required resources1 of 1 have
product
summer-bottle · generated on platform
Filled. Used as a typed reference in the hero composition.
its compose-preview was a LEAF
per-resource compose-preview · product
Studio packshot of the Summer Splash bottle, frontal hero angle, soft gradient seamless backdrop, crisp condensation, even product lighting, true brand teal-and-coral label, no props.
returns
{ prompt, guide } · no requiredResources What we defer
Deferred — NESTED
recursive checklist
A generated resource that exposes its own sub-checklist — a recursive
ResourceChecklist — so each sub-resource could itself be generated, and so on. Powerful, but unbounded.Not in E4c · deferred
Required resources1 generating
…each could expand again, recursively
compose-preview · product
Studio packshot of the bottle…
returns
{ prompt, guide, requiredResources:[…] } · blockedRe-planning the whole set (a generated resource changing what the parent image needs) is part of the same deferred shape.
The flat guard — enforced in code
The per-resource compose-preview is contractually a leaf. Its return type cannot carry resource nodes, so a generated resource can only ever fill its own slot.
The preview endpoint returns
{ prompt, guide } only — the requiredResources field is not part of the per-resource preview shape.
A generated asset writes back to its own
GenerationResource node and flips it to have. It never inserts new sibling or child nodes.
The checklist renders one
ResourceChecklist, derived from the parent image's requirements — it is never re-derived from a generated child.
Recursion depth is fixed at 1 by construction, not by a runtime limit — there is no node type that can hold a nested checklist.
Unchanged from the rest of E4c: per-resource Generate resolves creds via resolveMediaProviderKey (Higgsfield connector) and spends a media credit; only TEXT compose / refine of a resource's prompt uses the platform key and is free.
The rule. A generated resource fills its node and stops. The per-resource compose-preview must not emit its own
requiredResources. Nested sub-generation and re-plan-the-whole-set stay deferred — re-engage only when a real workflow needs depth > 1.