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
- After shared elements are cataloged and deduplicated, the element behavior detection pipeline fires automatically in the background.
- An LLM analyzes each shared element's code pattern, type, and page context to identify interactive behaviors.
- 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.
- This tool returns all behaviors for the job, optionally filtered to a specific element ID.
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
job_id |
string |
required | The clone job ID |
element_id |
string |
optional | Optional: filter to a specific shared element ID |
What You Get Back
- Total behavior count
- For each behavior: id, shared_page_element_id, element_label, element_type
- trigger_event — what activates the behavior (click, hover, scroll, load, etc.)
- action_type — the type of interaction (modal_open, nav_expand, carousel_slide, form_submit, etc.)
- expected_outcome — plain-English description of what happens
- model_used — LLM that detected the behavior
- notes — any additional context
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.
