You're running the PageHub workflow "Make sure I get leads" on site <your site id>.
- Pass `id: "<your site id>"` on every PageHub tool call (the Stripe and checkout tools name it `siteId: "<your site id>"`).
- Every change stages in the site's draft. Never call `publish_site` unless the user says to publish.
- Finish by showing the proof: A wiring table of every form and button before and after, phone screenshots of the home page and the quote form, and the list of changes.
- Keep to about 14 minutes of work. If more is left, list it and stop.
- Draft preview: https://pagehub.dev/view/<your site id>
- This needs the PageHub connector (https://pagehub.dev/api/mcp). If its tools aren't available, tell the user to add it and stop.

Goal: make sure every enquiry on site <your site id> reaches the owner and the
visitor sees that it was sent, with one quote form that every main button
opens. Keep the site's design and wording; add only what's missing.

Extra inbox for leads: (not given)
What the owner needs to know: (not given)

## 1. Map the wiring (read-only, about 4 minutes)

1. `select_site` for the site's name and timezone. `list_pages` for page ids.
2. Forms: `search_site_files` for `{% form` across the site, then
   `read_site_file` on each file that has one. Note each form's name, its
   destination arguments (an extra email address, a collection map, a webhook,
   a redirect) and its fields. A form is working when it is a Liquid form block
   with a name, a submit button, a posted-successfully check that shows a
   thank-you, and its errors. Without the thank-you, a visitor sees nothing
   happen after pressing Send.
3. Buttons and links: `search_site_files` for "Quote", "Book", "Contact",
   "Call", "Get started" and "Free estimate". Note each one's destination: does
   it open a dialog (a `commandfor` attribute), scroll to one (`href="#..."`),
   go to a contact page, or do nothing?
4. Dialogs: for every `commandfor` target, find the `<dialog>` whose `id`
   matches (`search_site_files` for the id). A target with no matching id is a
   dead button.
5. Phone: every `tel:` link uses the same number, and the header has one.
6. `get_site_chat`: on or off, greeting, lead fields, notify email, and
   whether the owner has AI credits. `search_site_files` for `data-chat` to see
   whether the chat bubble is placed.
7. `screenshot_site` of the home page at `width: 390`, `fullPage: true`. This
   is the "before".

Write the "before" wiring table: each form and each contact button, where it
leads, and what's wrong.

## 2. One quote form, opened by every main button (about 5 minutes)

Read `get_style_reference` with `topic: "liquid"` once and use `get_block` with
`slug: "contact-cta-modal"` as a shape reference only.

If the site already has a working quote or contact dialog, reuse it and skip
to the buttons. Otherwise add one to a partial that every page renders (the
footer partial), with `edit_site_files`:

- A `<dialog>` with `id="quote-modal"`, `closedby="any"`,
  `aria-labelledby="quote-modal-title"`, classes
  `z-[1200] m-auto bg-base-100 text-base-content rounded-box w-full max-w-md p-space-lg`.
- A close button inside it: `commandfor="quote-modal" command="close"`, an
  `aria-label`, and an icon through the site's icon filter. An h2 with
  `id="quote-modal-title"`, written in the site's voice.
- The form: a Liquid form block named `quote`, with `to:` set to the extra inbox
  when one was given. Inside it a posted-successfully branch that says it was
  sent, when the owner replies and the phone as a `tel:` link, and an else
  branch with the fields: name, phone (`type="tel"`), email, then what the
  owner needs to know, else a message textarea. Every field has a `name`, a
  visible `<label>` and `autocomplete`; phone or email is required, not both.
  Inputs get `border border-base-300 bg-base-200 rounded-box px-space-sm py-space-xs w-full`.

Then rewire the contact buttons in one `edit_site_files` call: give every
"quote", "book", "estimate" and "get started" button in the header, hero,
mobile menu and closing sections `commandfor="quote-modal" command="show-modal"`.
Leave "Call" buttons on their `tel:` link, and leave links to a full contact
page as they are. A link can't open a dialog; turn it into a button only when
it is styled as one.

## 3. Fix the other forms (about 2 minutes)

For each existing form missing its thank-you state, add the posted-successfully
branch and the errors with `edit_site_files`. Add `to:` when an extra inbox was
given. A form with no name gets one.

## 4. Chat (about 1 minute)

With `set_site_chat`, without changing `enabled`: a `greeting` in the site's
voice, `leadFields` `["name", "phone", "email", "message"]`, `instructions`
naming the services and service area from the site and asking the bot to
offer the quote form, and `notifyEmail` set to the extra inbox when given.
Turning chat on spends the owner's AI credits on every visitor conversation,
so ask first. If no chat bubble is placed, `apply_kit_block` with
`slug: "site-chat-bubble"` on the home page (or the footer partial's page) once.
Never build a chat widget by hand or inject a third-party one.

## Don't

- Don't submit a form or send a test email yourself: it emails the owner.
  Offer it as a check after publishing.
- Don't change the timezone or any other site setting with `update_site`; it
  applies to the live site at once. List a missing timezone instead (lead
  emails show times in it).
- Don't `publish_site`. Forms only receive leads on the published site, so
  end by asking.
- Palette tokens, spatial tokens and the site's icon filter only. Nothing
  visible goes in `site.json` inject.

If a write fails, read the file again and retry once with the smallest change. If it
fails again, note the exact error and move on.

## 5. Prove the wiring (about 2 minutes)

1. Re-read with `read_site_file`: the quote form (name, destination, thank-you
   branch) and every rewired button (its `commandfor` equals `quote-modal`).
   Confirm `quote-modal` exists once.
2. `screenshot_site` of the home page at `width: 390`, `fullPage: true`, and
   of the open dialog: `selector: "#quote-modal"`. A closed dialog can come out
   blank; if so, note it and rely on the file check.

Reply with:
- The wiring table, before and after: each form and button, where it leads.
- Where leads go now: site owners by email, plus the extra inbox, and the
  Form submissions inbox in the dashboard.
- What's left for the owner: turning chat on (uses AI credits), placing the
  chat bubble, the timezone, and a real test submission after publishing.
- The draft preview link (the `Draft preview:` address `screenshot_site` prints; never one you build), and a question: publish these changes now?
