FIGMA AGENT: LIBRARY-SAFE FORM-STATE PROMPTS Replace every [PLACEHOLDER] with your exact library names. Run the instance audit after each prompt. === PROMPT 1: ERROR STATE === Select frame: [FRAME_NAME] Add an error state to this form. Use ONLY these library components: - Field: @[INPUT_COMPONENT] with its error variant ([ERROR_VARIANT_PROPERTY]=[ERROR_VALUE]) - Message: @[HELPER_TEXT_COMPONENT] set to its error style - Optional banner: @[INLINE_ALERT_COMPONENT] Error to show: [FIELD_LABEL] is invalid. Message text: "[ERROR_MESSAGE]". Constraints: - Swap variants on the existing instances. Do not detach any instance. - Do not create new rectangles, text layers, icons or frames to imitate a component. - Use colors only from the variable [ERROR_COLOR_VARIABLE]. No hex values. - Put the result in a new frame named "[FRAME_NAME] / Error". When finished, reply with: 1. A list of every layer you changed or added, and the component each one is an instance of. 2. Anything you couldn't build from the listed components, marked "MISSING". === PROMPT 2: SUBMITTING / LOADING === Select frame: [FRAME_NAME] Create the submitting state of this form in a new frame named "[FRAME_NAME] / Submitting". Use ONLY: - @[BUTTON_COMPONENT] with [LOADING_VARIANT_PROPERTY]=[LOADING_VALUE] - @[INPUT_COMPONENT] with [DISABLED_VARIANT_PROPERTY]=[DISABLED_VALUE] for every field Constraints: - If the button has no loading variant, do not draw a spinner. Report "MISSING: button loading variant". - Do not detach instances or add new shapes, icons or text layers. - Keep the field values from the original frame. Reply with: the layer -> component list, then any MISSING items. === PROMPT 3: SUCCESS === Select frame: [FRAME_NAME] Create the success state after submission in a new frame named "[FRAME_NAME] / Success". Use ONLY: - @[INLINE_ALERT_COMPONENT] with [SUCCESS_VARIANT_PROPERTY]=[SUCCESS_VALUE] - @[BUTTON_COMPONENT] for the next action, label "[NEXT_ACTION_LABEL]" - Existing heading style: [HEADING_TEXT_STYLE] Message: "[SUCCESS_MESSAGE]" Constraints: - Any icon must be an instance of @[ICON_COMPONENT]. No new vectors. - Text layers are allowed only for the heading, and they must use [HEADING_TEXT_STYLE]. - No detached instances. Reply with: the layer -> component/style list, then any MISSING items. === PROMPT 4: DISABLED === Select frame: [FRAME_NAME] Create a disabled version of this form in "[FRAME_NAME] / Disabled". Switch every @[INPUT_COMPONENT], @[CHECKBOX_COMPONENT] and @[BUTTON_COMPONENT] instance to [DISABLED_VARIANT_PROPERTY]=[DISABLED_VALUE]. Constraints: - Only change variant properties. Don't change opacity, fills or strokes by hand. - If a component has no disabled variant, leave it unchanged and report it as MISSING. Reply with: each instance and the variant it now uses, then any MISSING items. === PROMPT 5: INLINE VALIDATION ON FOCUS === Select frame: [FRAME_NAME] Show [FIELD_LABEL] focused and failing a live rule, in "[FRAME_NAME] / Inline validation". Use ONLY: - @[INPUT_COMPONENT] with [FOCUS_VARIANT_PROPERTY]=[FOCUS_VALUE] and [ERROR_VARIANT_PROPERTY]=[ERROR_VALUE] if that combination exists - @[HELPER_TEXT_COMPONENT] for the rule text: "[RULE_TEXT]" Constraints: - If no variant combines focus and error, say so and pick the closest existing variant. Don't layer extra strokes on top. - No detached instances, no new shapes. Reply with: the variant combination you used, whether it exists in the library, then any MISSING items. === PROMPT 6: DEFAULT WITH HELPER + OPTIONAL LABELS === Select frame: [FRAME_NAME] Tidy the default state of this form in "[FRAME_NAME] / Default". - Add helper text under [FIELD_LIST] using @[HELPER_TEXT_COMPONENT]. - Mark [OPTIONAL_FIELDS] as optional using the field's built-in property [OPTIONAL_PROPERTY], if it exists. - Spacing between fields: variable [SPACING_VARIABLE]. Constraints: - Use auto layout with [SPACING_VARIABLE]. No hard-coded gap numbers. - If [OPTIONAL_PROPERTY] doesn't exist, report MISSING. Don't type "(optional)" into the label by hand. - No detached instances. Reply with: the layer -> component list, the spacing variable applied, then any MISSING items.