Determine if the request is general or instance-specific.
Discover relevant entities and services using `ha_get_overview`, `ha_search_entities`, and `ha_list_services`.
Inspect existing configurations using `ha_config_get_automation`, `ha_config_get_script`, and `ha_deep_search`.
Draft a minimal, valid YAML/JSON configuration.
Validate templates using `ha_eval_template`.
Create/update automation or script using `ha_config_set_automation` or `ha_config_set_script`.
Troubleshoot runs using `ha_get_automation_traces` and `ha_get_logbook`.