You're running the PageHub workflow "Fix my scores" 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: SEO and accessibility results for each page before and after, the list of changes, and phone screenshots of the home page.
- Keep to about 12 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: fix every search, accessibility and speed problem on site <your site id> that
can be fixed without changing its design or its wording, then prove it.

What customers search for: (not given)
Where to start: (not given)

## 1. Measure first (read-only, about 3 minutes)

1. `list_pages` to get page ids, urls and files. Pick the pages to work on: the
   home page, then the pages named in "Where to start", then up to 3 more in
   nav order. Skip hidden pages and the 404 page. At most 5 pages in total.
2. For each picked page, run `audit_seo` with `pageId` and `audit_accessibility`
   with `pageId` and `level: "AA"`. Write down, per page: the SEO score, the
   number of accessibility violations by severity, and the file or markup each
   finding points at. This is the "before" column. Do not re-run an audit you
   already have.
3. `screenshot_site` of the home page at `width: 390`, `fullPage: true`. This is
   the "before" picture.
4. Speed checks, read-only. Read each picked page's file with `read_site_file`
   (and `partials/header.liquid` if the pages render it):
   - `search_site_files` for `<img` and `image` lists every image. Note each
     image whose source is an outside https URL (hotlinked, so not resized or
     cached) instead of a media id run through the image filter, every image below the
     first section with `loading="eager"`, and every image other than the first
     hero image with `fetchpriority="high"`.
   - `search_site_files` for `<video`. A video in the first section is a speed
     cost; note it, don't remove it.
   - `read_site_file` on `site.json`. Read `inject` and list each third-party
     script by what it is (chat widget, tracking pixel, font loader). Don't
     change these.
   - In the first section of the home page, note a main heading or image with a
     `data-animate` attribute: the entrance effect delays when the main content
     shows.

## 2. Fix (about 7 minutes)

Work page by page. Put each page's file changes into one `edit_site_files` call
(it saves them as one write). Never fire parallel edits on the same site.

Search (SEO):
- Page title and description: `update_page` with `seo.title` (50 to 60
  characters) and `seo.description` (120 to 155 characters). Write them from
  what the page actually says, and work the search terms in naturally when
  they were given. Never use `update_site` for this: it sets the site-wide
  fallback, not the page.
- Exactly one h1 per page. Change extra h1 elements to h2, and fix skipped
  heading levels (an h2 followed by an h4 becomes h2, h3). Keep the classes.
- Every meaningful image gets `alt` describing what it shows. Decorative images
  get `alt=""` and `aria-hidden="true"`.
- Link and button text like "click here" or "read more": add an `aria-label`
  that says where it goes, e.g. "Read more about brake repair". Leave the
  visible text alone.

Accessibility:
- Contrast failures: switch to a stronger palette token, never a hex or a
  `text-gray-*` class. Faded text such as `text-base-content/50` becomes
  `text-base-content/70` or full `text-base-content`. Text on `bg-primary` uses
  `text-primary-content`, and the same for secondary, accent and neutral.
- Icon-only buttons and links get an `aria-label`.
- Every form input has a visible `<label>` or an `aria-label`.

Speed:
- Hotlinked images: `upload_image` with `imageUrl` set to the current source,
  then replace the `<img>` with the uploaded media id written through the
  site's image filter (copy how a neighbouring page does it), keeping its classes. If an upload fails, leave that image as it is and list
  it.
- Below-the-fold images with `loading="eager"`: remove the attribute so the
  browser's lazy-loading applies.
- `fetchpriority="high"` on anything except the first hero image: remove it.
- An entrance animation on the main heading or image of the first section:
  remove the `data-animate` attribute on that element only. Leave animations
  further down the page.

Don't do any of these, and list them for the user instead:
- Removing or changing scripts in `site.json` inject, a hero video, fonts or
  the theme.
- Rewriting visible copy, moving or deleting sections, or changing layout.

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

## 3. Prove it (about 2 minutes)

1. Re-run `audit_seo` and `audit_accessibility` on the same pages with the same
   arguments. This is the "after" column.
2. Take the "after" screenshot of the home page at `width: 390`, `fullPage:
   true`, and compare it with the "before" one. If anything looks broken
   (text you can't read, a missing image), undo that change.

## 4. Report

Reply with:
- A table: page, SEO score before and after, accessibility violations before
  and after.
- What changed, grouped by search, accessibility and speed, in plain words
  ("Added descriptions to 4 pages", not file paths).
- What's left that needs the user's decision, from the "Don't do" list above.
- The draft preview link (the `Draft preview:` address `screenshot_site` prints; never one you build), and a question: publish these changes now (`publish_site`)?
