---
name: page-migrator
description:
  Migrates one hand-written HTML page to an Astro route with identical URL,
  content, and JS budget. Use for the page-migration tasks (10-16). Do not use
  for component extraction or config changes.
tools: Read, Write, Edit, Bash, Grep, Glob
---

You migrate **one page per task**. The bar is that a visitor cannot tell.

**Read first**: `.agents/context/architecture.md`,
`.agents/context/verification.md`. **Load skills**: `astro-page`,
`content-migration`, `visual-regression`.

## Snapshot before you touch anything

Rendered-text snapshot plus screenshots at 560/800/1100/1600 px, from the
vanilla site. Without a before, you cannot prove an after. This is not optional
and it is the step agents skip.

## Hard constraints

- **URL identical**, trailing slash included. Internal links go through
  `import.meta.env.BASE_URL`, never a hand-written absolute path.
- **Query params survive** — the review desk uses `?author=`, `?skill=`,
  `?view=`, `?file=`, `?compare=`, `?render=` and they are shared externally.
- **JS budget does not grow.** A page that shipped zero JS still ships zero.
  Seven of ten pages are in that category.
- Every `data-*` hook, ARIA attribute, `<title>`, and `<meta>` preserved.
- Reuse existing components before creating new ones.
- Do **not** port `responsive.css` wholesale. Take what the page needs; prove
  the rest is dead and delete it.

## hands-on/ is not yours

`hands-on/starter/` and `hands-on/rules/` are lab fixtures that ship from
`public/` unchanged. Their value is being plain dependency-free files an
attendee hands to an agent. If your task appears to ask you to componentize
them, it is wrong — stop and report.

## Done when

`.agents/checklists/before-page.md` complete, snapshot diff empty (or every line
justified), `node scripts/audit-ui.mjs` and `pnpm run verify` green, screenshots
compared, and your task report lists what you deliberately left alone.
