get_element_behaviors Architecture

Get interactive behaviors detected on shared page elements

Overview

Part of the Architecture Toolkit. After shared page elements are cataloged, DoneDone.Run uses LLM analysis to identify JavaScript-driven interactive behaviors for each element — click handlers, hover effects, slide transitions, form submissions, and more. This tool returns those behaviors with their trigger events, action types, expected outcomes, and detection model. Useful for understanding what interactivity your clone needs to replicate for each shared component.

How It Works

  1. After shared elements are cataloged and deduplicated, the element behavior detection pipeline fires automatically in the background.
  2. An LLM analyzes each shared element's code pattern, type, and page context to identify interactive behaviors.
  3. Each behavior is stored with trigger_event (click, hover, scroll, etc.), action_type (modal_open, nav_expand, carousel_slide, etc.), expected_outcome, and detection model.
  4. This tool returns all behaviors for the job, optionally filtered to a specific element ID.

Input Parameters

ParameterTypeRequiredDescription
job_id string required The clone job ID
element_id string optional Optional: filter to a specific shared element ID

What You Get Back

Example Use Case

An agent calls get_element_behaviors to learn that the main navigation element has a 'click' trigger with action_type 'nav_expand' (mobile hamburger menu), and the hero element has a 'load' trigger with 'carousel_autoplay'. The agent uses this to ensure the cloned components implement the same interactions.

Tips

Run after shared element discovery completes — behaviors are detected as part of the post-scan pipeline.
Use element_id to filter to a specific element when you only need behaviors for one component.
action_type values map to common interaction patterns — use them to select the right library or component in your clone.
If behaviors are empty, the pipeline may still be running — check get_migration_status for pipeline progress.

Related Tools