You're running the PageHub workflow "Add your menu or price list" 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: The new collection with its row count, phone screenshots of the list and of one item page, and the item count checked against the file.
- 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: put every item from the user's file on site <your site id> exactly as the
file has it, stored in a collection so the owner can edit items later
without touching the design.

The list: (not given)
The file: (not given)
Where it goes: (not given)

An attached file arrives in this chat as an "I've attached N file(s)" block
with its contents (tables as a preview, documents in full); read the items
from there. A file that is only named or linked, not attached, you can't
read. If neither the list nor an attached file gives you the items, ask for
them and stop.

## 1. Read the file and the site (about 3 minutes)

1. Parse the items. Copy names, descriptions and prices word for word,
   including the currency and units as written ("$12", "from $45", "per
   hour"). A blank cell stays blank. Never invent a description, price, photo
   or dietary tag. Note the group each item sits under (menu section, product
   type) and the order of groups and items.
2. Count the items. This count must match the collection at the end.
3. `list_collections`. If one already holds this kind of item, read it with
   `get_collection` and ask whether to replace it or add a new one before
   writing anything.
4. `list_pages`, and when "Where it goes" names a page, `read_site_file` on its
   file to see its sections. Copy the class names of one existing section, so
   the new section matches the site. `get_style_reference` with
   `topic: "liquid"` has the loop and filter syntax.
5. `screenshot_site` of the target page (or the home page when a new page will
   be made) at `width: 390`, `fullPage: true`. This is the "before".

## 2. The collection (about 3 minutes)

1. `create_collection` with a plural slug (`menu-items`, `services`,
   `products`), `isPublic: true`, and a `schema` holding only the fields the
   file has:
   - `title` (text, required) and `slug` (text, required, kebab-case, unique;
     add `-2` on a clash),
   - `group` (text) for the section heading, `position` (number) for order,
   - `description` (text), `priceText` (text, the price exactly as written),
   - `image` (image) only when the file links images,
   - any other column the file really has, as text.
   Plain text only: HTML in a field shows as literal tags.
2. Images: for each image URL in the file, `upload_image` with `imageUrl`, and
   store the returned mediaId in `image`. A failed upload leaves the field
   blank; list it.
3. Rows: up to 500 at once with `create_collection_rows`. For a pasted CSV
   with more rows, or when the header already matches the field keys, use
   `import_collection_csv` with `mode: "append"`. Number `position` in file
   order.
4. `list_collection_rows` and compare `totalCount` with your item count. Fix
   any gap before building the page.

## 3. The list section (about 4 minutes)

Read `get_style_reference` with `topic: "pages"` once if you will make item
pages.

- Page: the page named in "Where it goes", else `add_page` with a plain name
  ("Menu", "Prices", "Products") and `text` holding the page's HTML (copy the
  header and footer renders from an existing page), then `update_page` with a
  real `seo.title` and `seo.description` from the file's content.
- Edit the page file with `edit_site_files` (or `write_site_file` for a new
  file): a section root
  `w-full bg-base-100 text-base-content py-space-xl px-container-x` (spatial
  tokens scale with the screen, so no `md:` padding),
  an inner `max-w-page mx-auto w-full`, an h2, then the items in
  `mt-space-xl`.
- Items repeat from the collection: a loop over the collection (hyphenated
  slugs are read as `collections['menu-items']`), sorted by `position`, with the
  loop variable named `item`. When the file has groups, add one heading plus
  one loop per group, filtering with the `where` filter on `group`, in the
  file's group order.
- Each row shows the double-curly outputs `{{item.title}}`, `{{item.priceText}}`
  and `{{item.description}}`. An image shows only when the collection has
  images, through the site's image filter on `{{item.image}}`, with alt text.
- Menus and price lists read best as rows (name and price on one line,
  description under it). Products and services read best as a card grid,
  `grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-space-md`.
- Palette tokens and spatial tokens only. Faded text no lighter than
  `text-base-content/70`.

## 4. Item pages, only when they earn it (about 1 minute)

Make a page per item only when most items have a description of two
sentences or more, or their own photo. A dish with a name and a price
doesn't need its own page; say so in the report.

When they do: `add_page` named for one item ("Product", "Service") with
`pathPattern: ":slug"` set by `update_page`, and `seo.title` set to the item's
title and the business name. Its file picks the row with the `where` filter on
`slug` equal to `request.params.slug`, and shows an h1 title, price,
description, image and the site's main call to action. Each list row gets a
link to the item page and the row's `{{item.slug}}`. Add the links in one
`edit_site_files` call when the rows already exist. Keep the item page out of
the nav.

## Don't

- Don't change prices, rename items or "tidy" descriptions. If something in
  the file looks like a mistake (a price of $0, a duplicate), keep it and
  list it.
- Don't hard-code the items as markup: the owner must be able to edit them in
  the collection.
- Don't `publish_site`. End by asking.

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 it and report

1. `screenshot_site` of the list page at `width: 390`, `fullPage: true`, and
   of one item page (`path` set to `/<item page slug>/<row slug>`) when you
   made them. Check that every group shows and in the right order. If a group
   comes up empty, `read_site_file` the page and check the loop's collection
   slug and `where` filter.
2. Re-count: the collection's `totalCount` against the file.

Reply with:
- "Added N of N items" and the collection name, with where to edit them
  (Dashboard, Collections).
- The draft preview link (the `Draft preview:` address `screenshot_site` prints; never one you build) to the list page, and item page links when made.
- Anything you couldn't use: images that failed, rows that looked wrong,
  why item pages were or weren't made.
- A question: publish these changes now?
