AI Helpers — Interactive Tester

1) Setup & Domain
Instructions: Load domains from the QUEUE DB and pick one. We resolve conn_id automatically (from nc_c_domain or db_queue_connect) so we can connect to the tenant and test functions.
2) Topic Discovery
Instructions: Choose how to derive the topic: domain uses c_domain.x_main_keyword / domain_keyword; pages reads existing group & page titles and asks AI for a 2–5 word canonical topic phrase.

            
3) Meta Title Tester
Instructions: Choose source topic or type your own; pick separator and mode:
  • core (AI core 2–5 words)
  • static_core (Static prefix + core)
  • static_core_domain (Static + core + always | {{domain_keyword}})
  • topic (AI from $topic)
  • from_other (rework another meta title)
Trimming preserves the optional domain suffix inside the max length (default 70).

            
4) Meta Description Tester
Instructions: Enter a topic and length (default 160). We generate one sentence and trim smartly.

            
5) Href Title/Text
Instructions: Enter a topic; we produce 1–5 word title and text, sanitized.

            
6) Discovery Prompt Builder (Strict JSON)
Instructions: Builds the JSON-only prompt using built index + leanest group. Use with ai_complete(...,'json') then ai_json_decode.

            
7) Read Built Index (Groups/Pages)
Instructions: Reads zx_a_{domain}_content_groups and zx_a_{domain}_custom_pages.

            
8) Image Vector Search Copy
Instructions: You can simulate (no writes) or call the actual copy helper. Paths are shown below.

            
9) Freeform ai_complete()
Instructions: Sends your prompt through ai_complete() (which auto-appends the DON'T block).

            
Live Log (jQuery printed to this page)
Instructions: Every action appends a timestamped JSON payload to this log.