You're running the PageHub workflow "Move my site here" 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: Phone screenshots of the moved pages and a desktop one of the home page, a page-by-page check against the old site, and the list of what didn't come across.
- 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: bring the user's current website into PageHub as an editable draft, with
their real pages, words and photos, then check each page against the old one.

Current site: (not given)
Built with: (not given)
Export or files: (not given)
Site this was started from: <your site id>

The import always makes a NEW draft site. It does not change site <your site id>.
Say this to the user at the start, and do every check and fix below on the new
site's id.

## 1. Pick the route (about 1 minute)

Choose from "Built with" and "Export or files". If both are blank or "not sure",
open the current site and look for signs (`/wp-content/` means WordPress,
`cdn.shopify.com` means Shopify), or ask the user.

- **WordPress with an export file** (WordPress admin → Tools → Export → All
  content, a `.xml` file): the WordPress import runs in the PageHub dashboard,
  not here. Send the user to https://pagehub.dev/start/import/wordpress. It
  brings over pages, posts (as a blog collection), menus and media. Tell them to
  run this workflow again on the new site afterwards for the page check in
  steps 3 and 4. Stop here.
- **Shopify or WooCommerce shop**: the product import runs in the dashboard at
  https://pagehub.dev/start/import/shopify or
  https://pagehub.dev/start/import/woocommerce. It copies products, variants and
  photos into the site's Stripe catalog. Pages and blog posts don't come across
  that way; for those, also do the "Only an address" route below on the shop's
  content pages (About, Contact, FAQ), up to 10 pages. Then point the user to
  the "Open my shop" workflow.
- **HTML files or a zip** (exported from Webflow, a static site, a designer's
  files):
  - If you can run a shell on the user's machine, zip the folder and call
    `import_site` with `size` set to the zip's exact byte count. Run the upload
    command it returns, then call `import_site` with the `uploadKey`.
  - Otherwise send the text files inline: `import_site` with `files` as
    `[{ path, content }]` (HTML, CSS and JS only, 3 MB in total, paths relative
    to the site root, `index.html` for the home page). Images can't go inline.
    Change their addresses to full `https://` links on the old site so they
    still load.
- **Only an address** (Wix, Squarespace, anything else that is live): if you can
  open web pages, read the home page and follow its main menu. Save each page's
  HTML, up to 10 pages in menu order, plus its own CSS files. Change every
  image, stylesheet and link address to a full `https://` address on the old
  site. Send them with `import_site` `files`. Use `about/index.html` style paths
  so the old addresses map to the new pages. If you can't open web pages, tell
  the user to save the pages from their browser or ask their current host for
  an export, and stop.

Pass `name` with the business name from the old site's title.

## 2. Wait for the import (about 2 minutes)

Call `get_import_status` with the `importId` about every 5 seconds until the
status is `ready` or `failed`.
- `ready`: note the new site id, the preview link, the page count, the warnings,
  the files that couldn't be imported and the redirects from the old addresses.
  The import has already saved those redirects. Don't call `set_redirects`
  unless one is missing: it replaces the whole list, so read every existing rule
  first and pass them all back.
- `review`: the import is waiting for the user to pick pages in the dashboard.
  Tell them, and stop.
- `failed`: report the exact error. The empty draft site it names is still
  there. Ask before removing it.
- A page limit message means the plan imported only some pages (the home page
  is always one of them). Say which ones are missing. After the owner upgrades,
  `import_site` with `restOf` set to the `importId` the message names adds them
  to this same site; the status text gives the exact call and the plans link.

## 3. Check every page (about 6 minutes)

Work on the new site id.

1. `list_pages` on the new site.
2. For each page, up to 8: `screenshot_site` with `path` set to the page slug
   at `width: 390` and `fullPage: true`. Shoot the home page once more at
   `width: 1440`. If `screenshot_site` says the day's screenshots are used up,
   check the rest from the preview link it gives. Compare each page
   with the same page on the old site, if you can open it: same headings, same
   paragraphs, same photos, same buttons and links, same contact details. Write
   down what is missing, broken, or in the wrong order.
3. `audit_seo` with each `pageId`. Note pages with no title or description, more
   than one h1, or images with no alt text.
4. `search_site_files` for `<img` and `src=`, then `read_site_file` on the files
   that hold them (up to 12). Note every image whose address still points at
   the old site. Those images break the day the old site is switched off.
5. `search_site_files` for `{% form` and `<form`. For each form, `read_site_file`
   and check where it sends. If it still posts to the old site (an `action`
   with the old address), the form will stop working when the old site goes.
   Note it. Don't change it on your own.

## 4. Fix what is safe (about 2 minutes)

Put each page's file changes into one `edit_site_files` call.
- Images still on the old site: `upload_image` with `imageUrl` set to the
  current address, then point that `<img>` at the uploaded media id through
  the site's image filter (copy how a neighbouring page does it). If an upload
  fails, list that image and move on.
- Pages with no title or description: `update_page` with `seo.title` (50 to 60
  characters) and `seo.description` (120 to 155 characters), written from that
  page's own wording. Never `update_site` for this.
- Missing alt text: describe what the photo actually shows.

Don't do these. List them for the user instead:
- Rewriting their wording, redesigning, or adding sections that weren't on the
  old site.
- Changing where a form sends.
- Pointing their domain at PageHub. That is a separate step, after they've
  checked the draft.
- Publishing. While the old site is still live, a published copy on a PageHub
  address competes with it in search. Before any publish, suggest
  `update_site` with `crawlMode: "noindex"` on the new site, and ask before
  calling `publish_site`.

## 5. Report

Reply with:
- The new site's id and its draft preview link, and a reminder that site
  <your site id> was left as it was.
- A table: page, came across (yes or partly), what's missing or broken.
- What you fixed, in plain words ("Moved 9 photos onto PageHub").
- What needs the user: forms that still send to the old site, pages over the
  plan limit, files that couldn't be imported.
- Next steps: check the draft, then "Go live" to connect their domain. Ask
  whether to keep the site this was started from.
