# Redesign a site without breaking the live one Source: [Redesign a site without breaking the live one](https://typeroll.com/docs/skills/tr-redesign-branch/) > Use when the user asks to redesign, modernize, or restructure a Typeroll site (or a section of it). Forces branch-isolated work so the live site stays untouched until the redesign is approved. This is the `tr-redesign-branch` recipe exactly as the Typeroll MCP server gives it to agents through `list_skills` and `read_skill`. See [Skills and recipes](https://typeroll.com/docs/skills/overview/) for how agents load recipes. > **The buffer model (draft writes).** Every content write in this recipe (pages, blocks and partials) lands in an unsaved per-doc DRAFT — deploys and plain previews only see SAVED content. For recipe-style build work, pass `save: true` on write calls (the work is pre-approved by the task itself), or run `commit_working_copy` per doc before any `trigger_deploy`. Preview your drafts with `include_working_copy: true`. Site-wide changes are exactly where copy-on-write branches earn their keep. This skill enforces the discipline: every redesign happens on a branch, preview-checked end-to-end, merged only after user sign-off. **Copy comes from the LIVE page, not a local draft.** A redesign changes the design, not the words. Read the existing copy from the live page (`read_page`/`batch_read_pages`) and carry it over verbatim. Local `sources/*.md` files are drafts — use them only if the user explicitly says “apply the copy in ``”. Don’t invent new headlines, drop sections, or “restore” text from an old draft; a draft that had drifted from the live page once sent a whole redesign off the approved wording. When you must change a word, change it on the live page too and keep the draft file in sync. **Restraint beats decoration.** Default to clean, purposeful design. Don’t reach for decorative motifs (suns, blobs, glows, mascots, confetti) to look “graphic” — unless a motif *means something for this brand/page*, it reads as random, and it’s usually the exact thing that clips, seams, and crops. These fragile patterns broke a real build — avoid them: * **A shape divider (wave/curve) between two sections** → don’t hand-roll it in `core/html`; a separate stacked shape seams against the next section (a Chrome sub-pixel hairline). Use `core/section`’s **`divider_top` / `divider_bottom`** (`wave | curve | tilt`) — the platform paints it in the section’s own colour and overlaps the neighbour by 1px, so it’s seam-free by construction. Put the divider on the section whose colour should rise/dip into the neighbour. * **A glow/decoration inside an `overflow:hidden` box** → clipped to a hard edge. Put it in a non-clipped layer, or size it to fade out before the box edge. * **`object-fit:cover` on a portrait inside a circle/frame** → crops heads and faces. Use `contain`, reframe the source art, or size the frame to the art. * **A gradient “fade” at a section join** → reads as the design being cut off. Make transitions deliberate (a clean shape or a solid edge), never a fade. These are invisible in a small full-page thumbnail and only show at real size in the actual browser — see the review gate in step 6. ## Recipe ### 1. Discover (always) ```plaintext get_site read_site_settings read_partial partial_id="header" read_partial partial_id="footer" list_pages limit=20 batch_read_pages page_ids=[] # see actual conventions list_partials # what free blocks exist list_content_types # any data we need to consider ``` Write the user a short read-back: *“This is a 12-page agency site using CSS variables, primary color #1e40af, Inter heading + Source Sans body. Existing pages are content-dense, single-column. Main nav has 5 items including a CTA. I’d suggest…”* Confirm direction before touching anything. ### 2. Create a branch ```plaintext create_branch name="" ``` Save the response’s `id` — pass it as `version=` on every subsequent call. Branches default `robots_blocked: true` so a half-finished redesign won’t be indexed. ### 2a. Launch basics (ask early) Ask the user for these once, early in the project. Read `read_site_settings` first and ask only for what is missing. Each item is optional. Record a skipped item in `decisions.md`, so the launch check in the last step holds no surprises. * **Default share image.** Ask the user to choose or create the image that social networks and chat apps show when a page has no image of its own: upload one (`create_upload_url` or `upload_media_from_url`), pick an existing one (`list_media`), or create one with `tr-imagegen`. Use a 1200×630 px PNG or JPEG and set it as `default_og_image` with `update_site_settings`. Never generate a title card from the page title instead. The user may skip this. * **Organization.** The business name, logo and official profile URLs (LinkedIn, Instagram, GitHub and similar). Set `organization` with `same_as`; it becomes the home page’s Organization schema. ### 2b. Write the design spec (REQUIRED — before you build) Every redesign branch MUST carry a written design spec. Without it the design choices live only in the agent’s head, so a later “just tweak the illustration style / palette” means re-deriving everything by hand (this gap cost a real project a full reverse-engineering pass). Write it BEFORE building so it guides the work, and keep it in sync as the design evolves. Save it as a markdown doc with the project (e.g. `design-spec.md`, or `prompts/design-system.md`) — or, if there’s no local working dir, as an unlisted page on the branch. It must capture: * **Palette** — every role + hex (background, surface, primary, accent, text, borders), and where the variant *diverges* from the brand and why. * **Typography** — fonts + weights/sizes per role. * **Illustration / imagery style** — the exact image-gen prompt prefix (tone, palette, formspråk, framing rules), so the imagery can be regenerated or restyled on its own without touching layout. State the business/concept constraints the imagery must respect (a wrong-concept image is worse than none). * **Section structure** — the page’s sections in order + each one’s treatment (band colour, layout). * **Rationale** — one line per major choice: *why* this direction. When the user later says “adjust just the illustrations” or “change the palette”, you edit the spec first, then apply — the spec is the source of truth for the design intent. ### 3. Iterate on the branch For each redesign step: a. Make the change with `?version=`. Updates here don’t touch main: ```plaintext update_partial partial_id="header" patch={...} version="" update_page page_id=home patch={...} version="" ``` b. Preview after every meaningful change: ```plaintext get_preview_link page_id=home version="" ``` Send the URL to the user. The preview navigates the whole branch from one mint. c. Iterate on feedback. Common rounds: headline tightening, color tweaks, swapping hero images. ### 4. Site-wide changes through partials, not pages If the redesign touches every page (e.g. new global header, new footer, new CTA bar) — edit a partial, not 23 pages. Before editing a shared block, check the blast radius: ```plaintext find_pages_using_block partial_id="header" version="" ``` This returns every page that would show the change. Communicate that to the user before the save. ### 5. Bulk content cleanups via dry-run first If the redesign requires content rewrites (e.g. “remove every mention of the old company name”), use the bulk tool with dry-run: ```plaintext search_pages contains="OldCo" version="" bulk_replace_text pattern="OldCo" replacement="NewCo" dry_run=true version="" # Show the user the sample_diffs bulk_replace_text pattern="OldCo" replacement="NewCo" dry_run=false version="" ``` ### 6. Approval round **Self-review is a multi-DIMENSION pass, not a glance — and most of it you MEASURE, not eyeball.** Structural checks (copy present, images return 200) are NOT a design review; never report “approved” off them. Don’t just list the bugs you happened to notice — walk every dimension below. Use the DB-live preview (a reused `get_preview_link`) for content and layout review: fix, reload, re-check, no re-deploy between fixes. It is a sandboxed, opaque-origin frame served from the portal, so DOM/computed-style reads from your browser tool are limited, third-party iframes usually stay empty, and consent, analytics, cookies and font loading cannot be verified there (`?consent=all|necessary` only pre-answers the banner). Run the measured checks, embeds, consent, analytics and fonts on the published temporary/test address of the branch after an authorized publish. **Use `tr-design-review` (`read_skill tr-design-review`) for the HOW** — it has the per-dimension measurement snippets (overflow ladder, computed contrast, touch targets, the anti-lazy-load broken-image check) and the scorecard + verdict format. The dimension summary below is the “what”; that skill is the runnable routine. In particular: scroll-and-settle to trigger lazy images BEFORE any full-page screenshot, or you’ll report blank boxes that aren’t real. 1. **Responsive** — screenshot across a width ladder (mobile / tablet / laptop / desktop / wide ≈390 / 768 / 1024 / 1440 / 1920px) AND sweep the page’s own `@media` breakpoints (read the page-scoped `