--- name: astro-page description: Migrate one hand-written HTML page of the ai-for-dummies site to an Astro route without changing its URL, content, or JS budget. Use for any page-level migration task. --- # Migrating a page to Astro ## Snapshot first, migrate second The snapshot is the only objective evidence that no content was lost. The vanilla site was deleted at cutover. To compare against it, check the pre-cutover tree out into a scratch worktree first: ```bash git worktree add /tmp/vanilla (cd /tmp/vanilla && python3 -m http.server 4173) & node .agents/scripts/snapshot-route.mjs http://localhost:4173/models/ \ > .agents/snapshots/models.txt ``` Screenshot the same route at 560 / 800 / 1100 / 1600 px as well. ## Migrate ```bash cp .agents/templates/pages/chapter.astro src/pages/models.astro ``` Then, in order: 1. Move markup into the layout + components. Reuse existing components before creating new ones. 2. Move copy into `src/content/`. Both `en` and `pt`, copied literally — never retyped. 3. Move page CSS into component `