JarvisHub Image Reference To Code
Convert approved reference images into final code only after the model has real visual context.
Required Inputs
- Target
webHeronode id. - Approved preview screenshot node ids.
- Any resolved webpage asset node ids or URLs.
- User approval evidence for the preview set.
Execution Rules
- Call
canvas_read_node_media_for_contextwith every approved preview screenshot node id before writing final code. - Generate code section by section in the same order as the preview screenshots.
- Construct complete
webHeroHtmlandwebHeroCss; do not construct or stagewebHeroDocumentHtmlbecause the server derives it. - In an Agent canvas workflow, call
canvas_webhero_check_readiness, copy its exactflowUpdatedAtandpreviewNodeIds, stage only HTML/CSS with one stable session ID, then callcanvas_webhero_code_commit. - When the frontend WebHero runner explicitly requests strict JSON and owns tool execution, return the requested HTML/CSS JSON to that runner; the runner must use the same readiness/stage/commit transaction before reporting success.
- Never use
canvas_update_node_dataor a generic Flow patch for final WebHero code. - Ensure the final DOM contains at least one real
<section>per approved preview screenshot. - Check that every CSS/JS
#section-idreference exists in the DOM.
Prohibited
- Do not put final HTML/CSS/JS into a text node.
- Do not rely only on preview prompts or URLs; the model must read the actual images through multimodal context.
- Do not collapse multiple approved preview sections into a single generic section.
- Do not finish if the code contains CSS/JS for a section but no matching DOM section.
- Do not persist a model-produced
webHeroDocumentHtml; accept only the server-derived document returned by commit.