@typeroll/mcp-server 0.45.144 → 0.45.146

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,14 +24,14 @@ export const BUNDLED_SKILLS = {
24
24
  "tr-redesign-branch": "---\nname: tr-redesign-branch\ndescription: 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.\n---\n\n# Redesign a site without breaking the live one\n\n> **The buffer model (draft writes).** Every content write in this recipe\n> (pages, blocks and partials) lands in an unsaved per-doc\n> DRAFT — deploys and plain previews only see SAVED content. For recipe-style\n> build work, pass `save: true` on write calls (the work is pre-approved by\n> the task itself), or run `commit_working_copy` per doc before any\n> `trigger_deploy`. Preview your drafts with `include_working_copy: true`.\n\n\nSite-wide changes are exactly where copy-on-write branches earn their\nkeep. This skill enforces the discipline: every redesign happens on a\nbranch, preview-checked end-to-end, merged only after user sign-off.\n\n**Copy comes from the LIVE page, not a local draft.** A redesign changes\nthe design, not the words. Read the existing copy from the live page\n(`read_page`/`batch_read_pages`) and carry it over verbatim. Local\n`sources/*.md` files are drafts — use them only if the user explicitly\nsays \"apply the copy in `<file>`\". Don't invent new headlines, drop\nsections, or \"restore\" text from an old draft; a draft that had drifted\nfrom the live page once sent a whole redesign off the approved wording.\nWhen you must change a word, change it on the live page too and keep the\ndraft file in sync.\n\n**Restraint beats decoration.** Default to clean, purposeful design. Don't reach\nfor decorative motifs (suns, blobs, glows, mascots, confetti) to look \"graphic\" —\nunless a motif *means something for this brand/page*, it reads as random, and it's\nusually the exact thing that clips, seams, and crops. These fragile patterns broke\na real build — avoid them:\n- **A shape divider (wave/curve) between two sections** → don't hand-roll it in\n `core/html`; a separate stacked shape seams against the next section (a Chrome\n sub-pixel hairline). Use `core/section`'s **`divider_top` / `divider_bottom`**\n (`wave | curve | tilt`) — the platform paints it in the section's own colour and\n overlaps the neighbour by 1px, so it's seam-free by construction. Put the divider\n on the section whose colour should rise/dip into the neighbour.\n- **A glow/decoration inside an `overflow:hidden` box** → clipped to a hard edge.\n Put it in a non-clipped layer, or size it to fade out before the box edge.\n- **`object-fit:cover` on a portrait inside a circle/frame** → crops heads and\n faces. Use `contain`, reframe the source art, or size the frame to the art.\n- **A gradient \"fade\" at a section join** → reads as the design being cut off.\n Make transitions deliberate (a clean shape or a solid edge), never a fade.\nThese are invisible in a small full-page thumbnail and only show at real size in\nthe actual browser — see the review gate in step 6.\n\n## Recipe\n\n### 1. Discover (always)\n\n```\nget_site\nread_site_settings\nread_partial partial_id=\"header\"\nread_partial partial_id=\"footer\"\nlist_pages limit=20\nbatch_read_pages page_ids=[<top 3-5 pages>] # see actual conventions\nlist_partials # what free blocks exist\nlist_content_types # any data we need to consider\n```\n\nWrite the user a short read-back: *\"This is a 12-page agency site\nusing CSS variables, primary color #1e40af, Inter heading + Source\nSans body. Existing pages are content-dense, single-column. Main nav\nhas 5 items including a CTA. I'd suggest...\"*\n\nConfirm direction before touching anything.\n\n### 2. Create a branch\n\n```\ncreate_branch name=\"<descriptive name>\"\n```\n\nSave the response's `id` — pass it as `version=<id>` on every\nsubsequent call. Branches default `robots_blocked: true` so a\nhalf-finished redesign won't be indexed.\n\n### 2a. Launch basics (ask early)\n\nAsk the user for these once, early in the project. Read `read_site_settings` first and ask only for\nwhat is missing. Each item is optional. Record a skipped item in\n`decisions.md`, so the launch check in the last step holds no surprises.\n\n- **Default share image.** Ask the user to choose or create the image that\n social networks and chat apps show when a page has no image of its own:\n upload one (`create_upload_url` or `upload_media_from_url`), pick an existing\n one (`list_media`), or create one with `tr-imagegen`. Use a 1200×630 px PNG or\n JPEG and set it as `default_og_image` with `update_site_settings`. Never\n generate a title card from the page title instead. The user may skip this.\n- **Organization.** The business name, logo and official profile URLs\n (LinkedIn, Instagram, GitHub and similar). Set `organization` with `same_as`;\n it becomes the home page's Organization schema.\n\n### 2b. Write the design spec (REQUIRED — before you build)\n\nEvery redesign branch MUST carry a written design spec. Without it the\ndesign choices live only in the agent's head, so a later \"just tweak the\nillustration style / palette\" means re-deriving everything by hand (this\ngap cost a real project a full reverse-engineering pass). Write it BEFORE\nbuilding so it guides the work, and keep it in sync as the design evolves.\n\nSave it as a markdown doc with the project (e.g. `design-spec.md`, or\n`prompts/design-system.md`) — or, if there's no local working dir, as an\nunlisted page on the branch. It must capture:\n\n- **Palette** — every role + hex (background, surface, primary, accent,\n text, borders), and where the variant *diverges* from the brand and why.\n- **Typography** — fonts + weights/sizes per role.\n- **Illustration / imagery style** — the exact image-gen prompt prefix\n (tone, palette, formspråk, framing rules), so the imagery can be\n regenerated or restyled on its own without touching layout. State the\n business/concept constraints the imagery must respect (a wrong-concept\n image is worse than none).\n- **Section structure** — the page's sections in order + each one's\n treatment (band colour, layout).\n- **Rationale** — one line per major choice: *why* this direction.\n\nWhen the user later says \"adjust just the illustrations\" or \"change the\npalette\", you edit the spec first, then apply — the spec is the source of\ntruth for the design intent.\n\n### 3. Iterate on the branch\n\nFor each redesign step:\n\na. Make the change with `?version=<branch-id>`. Updates here don't\n touch main:\n\n ```\n update_partial partial_id=\"header\" patch={...} version=\"<branch>\"\n update_page page_id=home patch={...} version=\"<branch>\"\n ```\n\nb. Preview after every meaningful change:\n\n ```\n get_preview_link page_id=home version=\"<branch>\"\n ```\n\n Send the URL to the user. The preview navigates the whole branch\n from one mint.\n\nc. Iterate on feedback. Common rounds: headline tightening, color\n tweaks, swapping hero images.\n\n### 4. Site-wide changes through partials, not pages\n\nIf the redesign touches every page (e.g. new global header, new\nfooter, new CTA bar) — edit a partial, not 23 pages. Before editing a\nshared block, check the blast radius:\n\n```\nfind_pages_using_block partial_id=\"header\" version=\"<branch>\"\n```\n\nThis returns every page that would show the change. Communicate that\nto the user before the save.\n\n### 5. Bulk content cleanups via dry-run first\n\nIf the redesign requires content rewrites (e.g. \"remove every mention\nof the old company name\"), use the bulk tool with dry-run:\n\n```\nsearch_pages contains=\"OldCo\" version=\"<branch>\"\nbulk_replace_text pattern=\"OldCo\" replacement=\"NewCo\" dry_run=true version=\"<branch>\"\n# Show the user the sample_diffs\nbulk_replace_text pattern=\"OldCo\" replacement=\"NewCo\" dry_run=false version=\"<branch>\"\n```\n\n### 6. Approval round\n\n**Self-review is a multi-DIMENSION pass, not a glance — and most of it you\nMEASURE, not eyeball.** Structural checks (copy present, images return 200) are\nNOT a design review; never report \"approved\" off them. Don't just list the bugs\nyou happened to notice — walk every dimension below. Use the DB-live preview\n(a reused `get_preview_link`) for content and layout review: fix, reload,\nre-check, no re-deploy between fixes. It is a sandboxed, opaque-origin frame\nserved from the portal, so DOM/computed-style reads from your browser tool are\nlimited, third-party iframes usually stay empty, and consent, analytics,\ncookies and font loading cannot be verified there (`?consent=all|necessary`\nonly pre-answers the banner). Run the measured checks, embeds, consent,\nanalytics and fonts on the published temporary/test address of the branch\nafter an authorized publish.\n\n**Use `tr-design-review` (`read_skill tr-design-review`) for the HOW** — it has\nthe per-dimension measurement snippets (overflow ladder, computed contrast, touch\ntargets, the anti-lazy-load broken-image check) and the scorecard + verdict\nformat. The dimension summary below is the \"what\"; that skill is the runnable\nroutine. In particular: scroll-and-settle to trigger lazy images BEFORE any\nfull-page screenshot, or you'll report blank boxes that aren't real.\n\n1. **Responsive** — screenshot across a width ladder (mobile / tablet / laptop /\n desktop / wide ≈390 / 768 / 1024 / 1440 / 1920px) AND sweep the page's own\n `@media` breakpoints (read the page-scoped `<style>`; resize a few px below +\n above each). At EVERY width: `document.documentElement.scrollWidth <=\n clientWidth` (no horizontal scroll), grids flip cleanly, nothing squished /\n orphaned / overlapping, no mid-word breaks. Two sizes is not enough — bugs hide\n in between. Also check a short/landscape viewport and 200% browser zoom.\n2. **Visual & brand** — logo FULLY VISIBLE (not clipped by a header\n `overflow:hidden` + overlap margin) and brand-compliant; screenshot the header\n IN CONTEXT, never the logo element in isolation (that hides clipping).\n Decoration robust at real size in the real browser: no hairline seam at a\n divider (use `core/section` `divider_top`/`divider_bottom` — don't hand-roll a\n band), no glow clipped to a hard edge, no `object-fit:cover` cropping faces, no\n gradient fade-cutoff. Typography: body line-length ~45–75ch, consistent scale,\n no awkward widows on headings. Palette adherence (no off-brand colours);\n consistent spacing / alignment / radius / shadow.\n3. **Accessibility — MEASURE, don't eyeball** — compute actual contrast ratios\n (WCAG AA: body ≥4.5:1, large/UI ≥3:1) and fix failures by deepening the\n offending colour token; meaningful `alt` on every image; exactly one `<h1>` +\n no skipped heading levels; visible `:focus-visible` on every interactive\n element; every input has an associated `<label>`; touch targets ≥44px on\n mobile; semantic landmarks (header/nav/main/footer) + nav `aria-label`; honour\n `prefers-reduced-motion`.\n4. **Functional** — the form actually works (POST action correct, hidden token\n non-empty, honeypot present + hidden; a long name/email doesn't break layout);\n every link + in-page anchor resolves (each `#anchor` has a matching `id`; no\n `href=\"#\"`/`\"\"`); ZERO console errors/warnings; interactions (menu toggle,\n hover/focus/active) work.\n5. **Content** — no unrendered `{{…}}` tokens in the DOM; no placeholder/lorem;\n copy still matches the source of truth (the live page) verbatim.\n6. **Findable (SEO/meta)** — `<title>` + meta description present + sensible;\n `og:title`/`og:description`/`og:image`; canonical; favicon + apple-touch-icon;\n `<html lang>`; `noindex` correct (branches must be noindex).\n7. **Fast (performance)** — images at sane sizes (not a 2048px file shown at\n 380px without a responsive variant), modern format (avif/webp), `width`/`height`\n or aspect-ratio set (no layout shift), below-fold lazy / above-fold eager.\n8. **Cross-browser** — the same CSS renders differently per engine (the divider\n seam was Chrome-only; WebKit/Firefox have their own). Re-check in another engine\n if you can; if only Chromium is available, statically flag risky props\n (`backdrop-filter` without fallback, `-webkit-`-only masks, `100vh` on mobile →\n prefer `100svh`, `sticky` inside `overflow`).\n\nFix what you find and re-check before involving the user. \"Looks structurally\nfine\" ≠ \"looks good\", and \"looks good in Chrome at 1440\" ≠ \"works for everyone,\neverywhere\" — never report a design as approved/perfect off a glance or a partial\npass.\n\nThen give the user the **DB-live preview link** to review — and use the SAME\nlink for your own verification:\n\n- **While iterating (default):** a reused `get_preview_link` (mint once,\n reuse — defaults to a 24h TTL). It renders from the database with NO build, so every\n edit shows on reload, and one link navigates the whole branch (internal\n links keep the token). The token URL is stable across edits — re-mint only\n when the 24h lapses, never per edit. Do NOT deploy just to let the user (or\n yourself) see a change.\n- **When they want the COMPILED static site** (a permanent bookmark, a\n stakeholder link to the built output, or a final pre-merge check): deploy\n the branch once (`trigger_deploy version=\"<branch>\"`) and share its stable\n address: `deploy_url` from `list_versions` / `read_version` once the deploy\n has succeeded. The publishing setup decides the host: under a Hosting Group\n it is a `v-…` host under that group's site address base (which need not be\n the site's own domain); otherwise it is the address the host reported. Never\n construct it yourself, and do not guess a `<branch>.<project>.pages.dev`\n alias. Branch deploys are `robots_blocked`, so the\n address won't be indexed. A per-deploy `<hash>.pages.dev` URL in the job\n details is for your own one-off checks (a new hash each deploy).\n\nDefault: review/iterate on the reused DB-live preview; deploy only for the\ncompiled output, the published-address checks in step 6, or merge. Wait for an explicit \"looks good, ship it.\"\n\n### 7. Launch: merge and deploy (required)\n\nA site is not finished until this step has run. Call `read_site_readiness`\nbefore the production publication and again after it. For every item with the\nstatus `warning` or `suggestion`, either fix it with the tool its `fix` names,\nor record in `decisions.md` (or the starter's `qa/` folder) why it stays open.\nTell the user which items remain. A missing default share image is only a\nsuggestion; leave it if the user chose to skip it.\n\nThe report warns and never blocks a publication. A clean report is not approval\nto publish: publish only when the user has approved it.\n\nBefore asking for sign-off, summarise exactly what will land:\n\n```\ndiff_version version_id=\"<branch>\" # added / modified / deleted per collection\n```\n\nThen, once approved (creating and merging branches need site admin\npermission):\n\n```\nread_site_readiness # on the branch, before the merge\nmerge_branch version_id=\"<branch>\" # branch's diffs land on main\ntrigger_deploy dry_run=true # then read get_publication_impact\ntrigger_deploy\nget_deploy_status job_id=<id> # poll until succeeded\n```\n\nA deploy ships everything saved on main, including other people's and other\nsessions' changes. If `get_publication_impact` lists changes that are not in\nthe branch, stop and ask whose they are before the real deploy.\n\nOptionally, after a successful deploy:\n\n```\ndelete_branch version_id=\"<branch>\" # tidy up\n```\n\n(You can also leave the branch around as a record of the redesign;\ndisk cost is tiny.)\n\nRun `read_site_readiness` again after the publication. It reads saved content\nand settings, so confirm the rest on the live site: the AI crawler zone check\nneeds the site's website host, and a Search Console property verified by DNS\nis not visible to Typeroll. The\n[launch checklist](https://typeroll.com/docs/guides/launch-checklist/)\nexplains every item.\n\n## Pitfalls\n\n- **Forgetting `version=` on writes.** Every call you make on the\n branch must include `version=<branch-id>`. A missing one writes\n straight to main — silent and bad.\n- **Skipping discovery.** \"Modernize\" without first reading the site\n produces a confidently-out-of-place result. Always sample existing\n pages.\n- **Deploying to preview.** Don't `trigger_deploy` after every edit just to\n see the change — that builds static pages and the URL is only as fresh as\n the last build. Iterate on a reused DB-live `get_preview_link` (renders from\n the DB, reflects edits on reload); deploy only for the compiled static\n output or merge (steps 6–7).\n- **Auto-merge.** Don't `merge_branch` without explicit user sign-off.\n Once merged, the only undo is another branch + reverse edits (or\n restoring individual saved states with `restore_page_revision` /\n `restore_partial_revision` on main).\n- **Starting over.** To abandon a direction but keep the branch and its\n address, `reset_version version_id=\"<branch>\"` discards every change on it\n (check `diff_version` and ask first); `delete_branch` removes it entirely.\n- **Header rewrites that drop the brand block.** Even when the\n redesign is dramatic, preserve the brand mark + the nav skeleton\n unless the user said to redo them.\n\n## When to NOT use a branch\n\nTiny edits — \"fix the typo on the About page\" — don't need a branch.\nThe in-portal chat handles those directly on main. This skill is for\nwork where:\n\n- The user might want to walk away mid-redesign and come back later\n- Multiple changes need to ship together\n- The site is high-traffic and \"broken for an hour\" is unacceptable\n- Stakeholder review across multiple pages is expected\n\nIf none of those apply, edit main directly and move on.\n",
25
25
  "tr-responsive": "---\nname: tr-responsive\ndescription: Use when a layout must behave differently at different screen sizes — different grid columns per breakpoint, an icon-box that's icon-on-top on mobile but icon-left on tablet, hiding a block on small screens, fluid type. Triggers on \"responsive\", \"mobile/tablet/desktop layout\", \"stack on mobile\", \"X columns on desktop and Y on mobile\", \"olika på mobil/surfplatta\", \"responsivt\".\n---\n\n# Make a Typeroll block layout responsive\n\nTyperoll has a built-in five-breakpoint system. You almost never hand-write\nmedia queries — you set per-breakpoint values on responsive fields and the\nrenderer compiles the `@media` rules per block instance.\n\n## The five breakpoints (mobile-first)\n\n`mobile (<640) · tablet (≥640) · laptop (≥1024) · desktop (≥1280) · wide (≥1536)`\n\nA responsive field takes either a scalar (applies everywhere) or a sparse\nobject `{ mobile?, tablet?, laptop?, desktop?, wide? }`. Missing breakpoints\ninherit from the next smaller one. So you only set the breakpoints that change.\n\n## Setting per-breakpoint values\n\nUse `set_block_responsive` (or pass the object form directly in `add_block` /\n`update_block` data). `read_block_type <id>` tells you which fields are\n`responsive`.\n\nThe breakpoint object belongs on the responsive field inside `block.data`,\nfor example `data.cols`. Do not add a top-level `block.responsive` object: it\nis not a rendered field, and page, partial and Page-template writes\nreject it instead of silently storing an inert value.\n\n```\n# 4 columns on desktop, 2 on tablet, 1 on mobile:\nset_block_responsive target={kind:page,id:home} block_id=<grid-id>\n field=cols value={ mobile: 1, tablet: 2, desktop: 4 }\n\n# icon-box: icon on top on phones, beside the text on tablet+:\nset_block_responsive ... block_id=<iconbox-id>\n field=layout value={ mobile: \"icon-top\", tablet: \"icon-left\" }\n```\n\nPass a scalar to collapse a field back to one value everywhere, except the\nlisting defaults below.\n\n### Listing grids and content gutters (Core 0.2.13)\n\n`core/repeater` and aliases such as `core/page_list` use one grid column below\n768px even when scalar `cols` is larger. Set `mobile_cols: 2` only when multiple\nmobile columns are intentional. An explicit responsive `cols.mobile` is honored;\n`mobile_cols` takes precedence. Above this threshold `cols` works normally.\nMasonry is opt-in and also uses the explicit mobile count. Other blocks retain\nthe five breakpoints above.\n\nContent gutters default to 1.25rem below 768px and 1.75rem at/above 768px.\nFull-bleed section backgrounds keep their padded inner content. Customize\n`--content-gutter` in site CSS if needed. Rebuild published sites after upgrading\nCore to apply these shared preview/static defaults.\n\n### Worked example — the classic feature grid\n\n\"4 cards/row with icon-on-top on desktop, 2/row with icon-left on a landscape\niPad, 1/row icon-on-top on a phone\":\n\n1. `core/grid` containing `core/icon_box` cards (or a `core/repeater` with\n `item_block: core/icon_box` for a Page-driven list).\n2. On the grid: `cols = { mobile: 1, tablet: 2, desktop: 4 }`.\n3. On each icon_box (or the repeater's item defaults):\n `layout = { mobile: \"icon-top\", tablet: \"icon-left\", desktop: \"icon-top\" }`.\n\nNo media queries authored — the build emits per-instance `@media` blocks and\nthe editor preview honours them. Flip the device toggle in the editor header\n(Mobil / Mobil-liggande / iPad / iPad-liggande / Desktop) to author and verify\neach breakpoint.\n\n## Hiding a block at some sizes\n\n`Block.hidden_on: Breakpoint[]` is universal — no per-block opt-in. E.g.\n`hidden_on: [\"mobile\"]` drops the block below 640px. Use it instead of building\na \"mobile-only\" duplicate.\n\n## Authoring a CUSTOM block type that's responsive\n\nTwo halves, BOTH required (`create_block_type` / `update_block_type`):\n\n1. Mark the field `responsive: true`.\n2. Expose it on the **outermost** template element as a CSS variable:\n `style=\"--{field}:{{field}}\"`, then read `var(--{field})` in the block CSS.\n\nIf the field's value is directly usable CSS (e.g. `direction: row|column` →\n`flex-direction: var(--direction)`), you're done.\n\nIf it's a friendly **token** that maps to CSS (e.g. `layout: icon-left` →\n`flex-direction: row`), add a `responsive_css` map on the field — otherwise the\nper-breakpoint overrides silently do nothing (a `[style*=\"--field:token\"]`\nselector can't see a `@media` override):\n\n```\n{ name: \"layout\", type: \"select\", options: [\"icon-top\",\"icon-left\"],\n default: \"icon-top\", responsive: true,\n responsive_css: { \"icon-top\": \"--dir: column;\", \"icon-left\": \"--dir: row;\" } }\n```\n\nThen the block CSS reads `flex-direction: var(--dir, column)`.\n\n## Fluid type — usually automatic\n\n`core/heading` and prose already use `clamp()` to scale smoothly between mobile\nand desktop. `core/heading` separates semantic `level` (h1–h6, for SEO) from\nvisual `size` (sm–3xl/auto) — \"h1 but only as big as an h3\" is one field, no\nbreakpoints needed.\n\n## Gotchas\n\n- Setting a value only at `desktop` leaves smaller screens on the field\n *default*, not on your value — set `mobile` too if you want a non-default\n baseline (mobile-first).\n- The editor preview width is approximate on a narrow panel, but the breakpoint\n you're editing is exact. Trust the deployed site / a wider window for `wide`.\n- **Never paper over horizontal overflow with `html,body{overflow-x:hidden}`.**\n Setting `overflow-x:hidden` on `html` forces `overflow-y` to compute as `auto`\n (CSS spec), turning `<html>` into a fixed-height nested scroller — the page\n then won't scroll normally (`window.scrollY` sticks at 0) and renders blank\n below the fold. Instead, find the element that overflows (a fixed width, a\n `transform:rotate` card poking out, a decorative `::before`/`::after`, a grid\n that didn't collapse) and fix THAT element's width / clip it with\n `overflow:hidden` on its own section. Verify with\n `document.documentElement.scrollWidth === clientWidth` at 360–390px.\n- `core/grid` `stack_at` and responsive `data.cols` both compile overrides\n that beat the inline mobile baseline. Verify the computed column count at\n the actual breakpoint; no page CSS workaround should be necessary.\n- Background design reference: `docs/responsive-blocks.md` in the platform repo.\n\n\n## Core 0.2.14 native defaults\n\nUse section/hero as top-level background carriers; their inner content owns the\n20px phone / 28px tablet gutters. Do not add another gutter to main. Section\npadding auto is 48/64/80px at phone/768/1280; heading auto is H1 28/32/36 and\nH2 22/24/24 at a 16px root. Use shared --type-h1…h4, --section-padding,\n--block-gap, --card-padding and --grid-gap tokens for theme overrides.\nNavigation collapses through 1023px and becomes inline at 1024px.\nImages preserve the complete subject with intrinsic height and contain; request\ncover and a ratio explicitly only when cropping is intended. Breadcrumb spacing\nuses --breadcrumbs-before / --breadcrumbs-after. Custom field-list item_html\nreplaces native bullets; core/list marker none supports custom icons.\nPreview and static CSS order is defaults → blocks/instances → site → Page.\nFrom render version 14 all platform CSS sits in cascade layers (reset, base,\ntokens, platform, instance) and site and Page CSS are unlayered, so a plain\nsite rule beats any platform rule whatever its specificity; do not add\n!important or doubled selectors to win. Before 14, specificity and order\ndecide. Inline values still beat stylesheets: from render version 16 the\nplatform writes only custom properties inline (spacing, text colour, image\nwidth and responsive values move to the instance layer), settings are exposed\nas data attributes (`[data-block=\"grid\"][data-gap=\"sm\"]`, not\n`[style*=\"--gap:sm\"]`), and platform media queries follow the site's\nresponsive widths. hidden_on visibility keeps its !important on purpose.\nCompare without temporary corrective CSS before removing any existing site rules.\n\n\n## Site-specific responsive widths (Core 0.2.28)\n\nThe five names stay the same, but their widths can be set in **Site settings →\nTypography → Responsive block widths**, or through `update_site_settings`:\n\n```json\n{\"responsive_breakpoints\":{\"tablet\":576,\"laptop\":769,\"desktop\":1024,\"wide\":1280}}\n```\n\nSend all four increasing integer widths (320–2560px); `null` restores\n640/1024/1280/1536px. Values are versioned with the site's settings. Responsive\nblock fields, repeater item overrides and `hidden_on` use these widths in the\neditor preview and static output. Reload an open editor after changing them.\nRepublish to update live pages; changing widths invalidates rendered-page caches.\n\nThis does not change explicit menu `collapse_below`, grid `stack_at`, listing\nmobile defaults or theme typography thresholds. Set the menu threshold separately\nwhen it must match, and use explicit responsive `cols` for exact listing columns.\nCheck one pixel below and at each threshold, including fractional widths for\nvisibility. Do not hide layout overflow to make a test pass.\n\n## Independent components (candidate capability 0.48.0)\n\nNot available in Core 0.2.31. Read capabilities and the live block registry first.\nEvery core block accepts `data.responsive_breakpoints` with all four increasing\nintegers (320–2560); null restores Site widths. It affects only that block's\nresponsive fields/visibility, not children. Listing grid and item cards are\nindependent: put card widths in `item_overrides.responsive_breakpoints`.\n\nA checklist card can use widths `{tablet:577,laptop:769,desktop:1041,wide:1440}`,\n`layout:{mobile:\"column\",desktop:\"row\"}`, `image_width_percent:40`,\n`image_sizing:{mobile:\"fixed\",desktop:\"stretch\"}`, `image_height_px:200`, and\nexplicit `image_fit:\"cover\"`. Intrinsic ignores pixel height; auto preserves it.\nUse stretch only for row layouts. Border, x/y panel padding, background and\n`title_font` are native fields. `action_label` no longer removes the title link;\n`title_link:false` opts out. Secondary actions prevent whole-card overlays.\n\nPDF styling is independent: `download_width:{mobile:\"full\",desktop:\"fill\"}`,\n`download_size_px:13`, `download_weight:\"700\"`, `download_color`,\n`download_border_width_px`, `download_radius_px`, `download_padding_x_px` and\n`download_padding_y_px`. `actions_align:\"center\"` centers the action row.\n`download_behavior:\"download\"` emits HTML download; cross-origin file hosts may\nstill cause browser navigation. Default is navigate, no proxy.\n\nColumns expose `left_width_px:150` and `stack_below_px:481` (stack through480).\nSet one fixed side; left wins if both set. Custom stacking overrides the preset.\nContainer `radius_px` and `shadow` (none/subtle/header) style a composed group.\nFrom render version 9 a shadowed container sits above the next block (z-index\n10, sticky keeps 100), so its shadow shows over a following hero; do not add\n`inline_style` z-index for that.\nMenus use matching SVG symbols; `close_size_px` overrides the close symbol size\nwithout shrinking the44px hit area. Compare exact threshold boundaries in real\npreview and static output before deleting corrective CSS.\n\n## Constrained containers in a column (render version 12)\n\nFrom render version 12 (Core 0.2.132), a `core/container` with width narrow,\nnormal or wide inside a container whose direction is column at every\nbreakpoint fills the column up to its maximum width, centered. Below 12, auto\nmargins shrink it to its content, so setting width `wide` does NOT make a card\nfill a column. Read `read_site_settings` → `render.version` before advising;\nwhen it is below 12, raise it with `tr-upgrade-rendering` instead of working\naround it in content. Rows, and containers that become rows at some\nbreakpoint, are unchanged.\n\n## Long words on small screens (render version 13)\n\nFrom render version 13 (Core 0.2.140), a container that is a column at every\nbreakpoint keeps its children on one line, and Text and Heading blocks break\na word that does not fit. A long word, URL or inline code span then no longer\nmakes every child of the container, and the page, wider than a 375 px screen.\nBelow 13, raise the version with `tr-upgrade-rendering` instead of adding site\nCSS such as `.intro > * { min-width: 0; max-width: 100% }`. Rows and\nfixed-width children are unchanged.\n\n## Native image framing and body heading scales (Core 0.2.35+)\n\nUse `core/image.scale_percent` (100–200, responsive) for deliberate horizontal\nframing; 100 retains the uncropped original. `focal_x`/`focal_y` are percentage\npositions; Image `fit`/`aspect_ratio` and Post Card `image_fit`/`image_aspect` are\nresponsive. Keep intrinsic dimensions and original SVG/alt. A mobile 120% centered\nimage uses scale_percent={mobile:120,tablet:100}, focal_x=50 and local\nresponsive_breakpoints={tablet:577,laptop:769,desktop:1024,wide:1280}.\n\nSet `h1_size_px`…`h6_size_px` on `template_content_slot`, not every Page heading.\nThese responsive values inherit through nested containers; explicit font_size_px\non a heading wins. `heading_before_px`/`heading_after_px` control article-rhythm\nspacing. The slot's local breakpoint map controls its scale. Breadcrumbs flow as\ninline ordered-list items, including long current titles. Do not shorten customer\nheadings to compensate for a layout issue. Read the deployed block schema first.\n\n## Native text links (Core 0.2.36+)\n\nInline links in native rich-text surfaces (including lists, tables and image\ncaptions) are underlined and keyboard-focusable by default. Use native fields;\ndo not add customer CSS patches just to restore recognizable text links. Card\ntitles, image wrappers, buttons and navigation retain their own styles. Republish\nexisting sites to adopt the updated renderer.\n",
26
26
  "tr-seo": "---\nname: tr-seo\ndescription: Use before a site's first launch and whenever the user asks to improve SEO, fix titles or meta descriptions, set a share image, add structured data, check the sitemap or robots.txt, control AI crawlers, or audit search visibility. Triggers on \"launch\", \"go live\", \"SEO\", \"meta descriptions\", \"share image\", \"Google ranking\", \"structured data\", \"JSON-LD\", \"sitemap\", \"llms.txt\", \"AI crawlers\", \"sökoptimering\", or \"hjälp mig synas på Google\".\n---\n\n# SEO and launch basics for a Typeroll site\n\n> **The buffer model (draft writes).** Every content write in this recipe\n> (pages, blocks and partials) lands in an unsaved per-doc\n> DRAFT — deploys and plain previews only see SAVED content. For recipe-style\n> build work, pass `save: true` on write calls (the work is pre-approved by\n> the task itself), or run `commit_working_copy` per doc before any\n> `trigger_deploy`. Preview your drafts with `include_working_copy: true`.\n\nRun this recipe at launch, from the last step of `tr-new-site`, the migration\nrecipes and `tr-redesign-branch`, and whenever the user asks about search\nvisibility. Start with `read_site_readiness`: it lists what is missing on the\nwhole site, with a fix and a guide link per item. Most of what search engines\nand AI agents need, the platform produces on its own; your work is the content\nand the few settings only the owner can decide.\n\n## What Typeroll handles automatically\n\nEvery publication produces these without any tool call. Do not recreate them\nby hand, and do not add a second copy through `json_ld`, `scripts_head` or a\npage.\n\n**Head of every page**\n\n- `<html lang>` from the Page `language`, otherwise the site `language`.\n- `<title>`: `seo_title`, otherwise the Page title, plus\n `default_seo_suffix` unless the Page sets `append_seo_suffix: false`.\n- `<meta name=\"description\">`: `seo_description`, then\n `default_meta_description`, then the tagline.\n- `<link rel=\"canonical\">`: the resolved route on the publication's origin, or\n an explicit `canonical_url`.\n- `<meta name=\"robots\">` from `noindex` and `nofollow`, and from the site-wide\n and version restrictions.\n- Open Graph and Twitter card tags (`og:title`, `og:description`, `og:image`,\n `twitter:card`, `twitter:site` from `twitter_handle`). Sharing text uses\n `og_title` and `og_description` when set.\n- Share image chain: `og_image`, then a public Content type field mapped to\n `image`, then `default_og_image`, then the logo. An SVG, AVIF or TIFF share\n image from the site's media library is published as a 1200×630 PNG copy,\n contained on the theme's background colour; the original stays the page\n image. `og:image:type`, `og:image:width` and `og:image:height` are emitted.\n- hreflang `<link rel=\"alternate\">` for Pages with `alternates`.\n- A Markdown rendition of each indexable Page at `<page path>index.md`,\n announced with `<link rel=\"alternate\" type=\"text/markdown\">`.\n- The first content images are never lazy and get `fetchpriority=\"high\"`, and\n a first section's background image is preloaded; later images are lazy.\n Logos and small icons do not count as the first images.\n A lazy image starts loading when it comes within two screen heights, so it\n has loaded when it is scrolled in (from Core 0.3.33; browsers on their own\n start it much closer, Safari almost at the edge).\n\n**Structured data (JSON-LD)**\n\n- `Organization` and `WebSite` on the home page, from `site_name`, `tagline`,\n `organization`, `logo`, contact and social settings.\n- `Article` for Pages with `kind: \"article\"`, with dates and `author`.\n- `BreadcrumbList` on every page below the home page, from resolved routes.\n- Content type schema from `schema_type` and `schema_field_map`.\n- `FAQPage` from an Accordion block (`core/accordion`) when every item's title\n ends with a question mark (`?`, `?`, `؟`) and has an answer. Nothing is\n added when the Page's `json_ld` or its Content type schema already declares\n `FAQPage`, so it is never emitted twice.\n\n**Site files**\n\n- `robots.txt`: your `robots_txt` setting, with the sitemap lines added. The\n `ai_crawler_policy` setting adds the matching AI crawler groups.\n A duplicate load of a theme font in custom CSS or `scripts_head` is reported\n by the readiness item `duplicate_fonts`, not removed.\n- `sitemap.xml`: published, indexable Page routes. With more than 45,000\n URLs it becomes a sitemap index over numbered `sitemap-<n>.xml` files.\n Pages with `alternates` carry their hreflang entries.\n- `sitemap-images.xml`: the public images of each indexable Page.\n- `llms.txt`: a Markdown map of the site for AI agents, grouped by Content type\n and language section, with each Page's description and links to the\n sitemap and `llms-full.txt`.\n- `llms-full.txt`: the Markdown of the indexable Pages in one file, with a size\n cap.\n- The `Content-Signal` response header, when `ai_crawler_policy` is not\n `allow_all`.\n\nNoindex and unlisted Pages, drafts and blocked versions are left out of every\nsite file.\n\n## Recipe\n\n### 1. Read the site's state\n\n```\nread_site_readiness\nread_site_settings\nlist_pages status=\"all\"\n```\n\n`read_site_readiness` returns `items` with `id`, `status` (`ok`,\n`suggestion` or `warning`), `message`, `fix` and `guide`. Work through the\nwarnings first. It never blocks a publication, and a clean report is not\napproval to publish.\n\nFor each important Page, check:\n\n- Does the title identify the page, including any suffix?\n- Is the description specific and supported by the page's content? Search\n engines may rewrite or shorten snippets; never pad text to a length.\n- Does the page have exactly one H1?\n\n### 2. Launch basics only the owner can decide\n\nRead `read_site_settings` first and ask only for what is missing. Each item is\noptional; record a skipped item in `decisions.md`.\n\n- **Default share image.** Ask the user to choose or create the image shown\n when a page has none of its own: upload one (`create_upload_url` or\n `upload_media_from_url`), pick one with `list_media`, or create one with\n `tr-imagegen`. Use 1200×630 px PNG or JPEG. Never generate a title card\n from the page title instead.\n\n ```\n update_site_settings default_og_image=\"<cdn_url>\" twitter_handle=\"@acmestudio\"\n ```\n\n- **Organization and profiles.** The business name, logo and official profile\n URLs:\n\n ```\n update_site_settings organization={\"name\":\"Acme Studio\",\"logo\":\"<cdn_url>\",\"same_as\":[\"https://www.linkedin.com/company/acme\"]}\n ```\n\n- **Site description and icons.** `default_meta_description` for pages without\n their own description, and `favicon` (other icon sizes are generated; see\n `tr-brand`).\n- **AI crawlers.** `ai_crawler_policy` is `allow_all` (the default, which writes\n nothing), `no_training` or `block_all`:\n\n ```\n update_site_settings ai_crawler_policy=\"no_training\"\n ```\n\n `no_training` disallows training-only crawlers such as GPTBot, ClaudeBot,\n Google-Extended, Applebot-Extended and CCBot, and states\n `Content-Signal: search=yes, ai-input=yes, ai-train=no`. It never blocks\n Googlebot, Bingbot or Applebot. On Cloudflare, the zone's own AI bot policy\n is enforced at the edge and wins over `robots.txt`; blocking Training there\n can also block Googlebot, Bingbot and Applebot. The readiness item\n `ai_crawler_zone_conflict` reports a mismatch. Never change the zone's\n settings yourself: tell the owner what to change.\n- **Pages a business needs.** Privacy policy, contact and a 404 page. Set the\n privacy page as `cookie_consent.privacy_policy_url` when the cookie banner is\n on.\n\n### 3. Titles and descriptions\n\n```\nupdate_site_settings {\"default_seo_suffix\": \" — Acme Studio\", \"trailing_slash\": \"always\"}\n\nbatch_update_pages updates=[\n {page_id: \"home\", patch: {seo_title: \"Acme Studio — Interior design in Stockholm\", seo_description: \"Acme designs...\"}},\n {page_id: \"about\", patch: {seo_description: \"We are...\"}}\n]\n```\n\n- Give the home page an explicit `seo_title`, so the suffix does not repeat\n the site name.\n- A page that must keep its exact title can set `append_seo_suffix: false`.\n- The readiness report flags duplicate titles and descriptions, missing or\n repeated H1s and descriptions over 160 characters. Fix them in the content;\n they are warnings, not rules to pad or trim text mechanically.\n\n### 4. URLs and articles\n\n- Slugs are lowercase kebab-case: `our-services`, not `Our_Services`.\n- Reflect hierarchy in the address: a team member lives at `/team/jane-doe`\n (set `path`, or use a Content type whose route pattern adds the prefix).\n Breadcrumbs and their schema follow the resolved route.\n- Blog posts and news get `kind: \"article\"` and an `author`.\n- Give shared pages, especially articles, their own `og_image`.\n- Link every published page from somewhere. The readiness item `orphan_pages`\n lists pages that no internal link reaches; `check_internal_links` finds\n broken saved links, including `#fragment` links whose heading or anchor id\n no longer exists (`missing_fragment`).\n\n### 5. Structured data beyond the automatic output\n\nUse structured data only for information the page visibly shows.\n\n- **FAQ:** an Accordion block whose item titles are questions ending in a\n question mark, each with an answer, produces `FAQPage` automatically. For\n FAQ content in another block, use `add_faq_schema`.\n- **Recipes and events:** `add_recipe_schema` and `add_event_schema` validate\n the input, build the JSON-LD and merge it into the Page's `json_ld`:\n\n ```\n add_recipe_schema page_id=\"kanelbullar\" name=\"Kanelbullar\"\n ingredients=[\"500 g flour\", \"2 tsp cinnamon\"] instructions=[\"Mix the dough.\", \"Bake at 225 °C.\"]\n prep_time=\"PT1H30M\" cook_time=\"PT10M\" recipe_yield=\"24 buns\" image_url=\"<cdn_url>\"\n add_event_schema page_id=\"summer-concert\" name=\"Summer concert\"\n start_date=\"2026-06-12T19:00:00+02:00\" location_name=\"City Hall\"\n location_address=\"Main Street 1, Sundsvall\" offers_price=250 offers_currency=\"SEK\"\n ```\n\n Read the returned `warnings`: a recipe without an image or an event without\n a location is valid but not eligible for rich results.\n- **Products, software and directories:** set the Content type's `schema_type`\n (for example `Product` or `SoftwareApplication`) and map its fields with\n `schema_field_map` in `update_content_type`, rather than writing JSON-LD on\n each Page.\n- **Other types:** write `json_ld` yourself as a JSON string. Keep several\n nodes in one `{\"@context\":\"https://schema.org\",\"@graph\":[…]}`. An update\n replaces the whole value, so read the Page first.\n\n ```\n update_page page_id=\"home\" patch={\n \"json_ld\": \"{\\\"@context\\\":\\\"https://schema.org\\\",\\\"@type\\\":\\\"LocalBusiness\\\",\\\"name\\\":\\\"Acme Studio\\\",\\\"url\\\":\\\"https://acme.se\\\"}\"\n }\n ```\n\nThe readiness item `structured_data` reports JSON-LD that is missing required\nproperties or has invalid dates or URLs.\n\n**Instead of the `schema_markup` workflow.** That workflow uses the\nOrganization's own AI key; without it, it fails with\n`failure_code: \"ai_not_enabled\"`. Don't retry it. Read each published page,\nchoose the one type it represents (or none), apply the tools above, and tell\nthe user you did it yourself.\n\n### 6. robots.txt, indexing and canonicals\n\n- `robots_txt` holds custom crawl rules; the sitemap lines are added for you.\n Use `ai_crawler_policy` for AI crawlers instead of hand-written groups.\n- To keep a page out of search but crawlable, set `noindex: true`. Blocking a\n path in `robots.txt` stops crawlers from reading that directive.\n- Set `canonical_url` only when a page deliberately points elsewhere, for\n example a cross-domain duplicate. Don't combine it with `noindex`.\n- `check_site_indexing` reports the robots policy of the actual address,\n including response headers.\n\n### 7. Languages\n\n```\nupdate_site_settings {\"language\": \"sv\"}\nupdate_page page_id=\"about-en\" patch={\"language\": \"en\"}\n```\n\nFor several languages on one site, use `language_sections` and Page\n`alternates`; see the multilingual sites guide.\n\n### 8. Search Console\n\nAsk the owner to add the site in Google Search Console. A Domain property\nverified with a DNS TXT record covers every address. For a URL-prefix\nproperty, put Google's verification `<meta>` tag in `scripts_head` (admin\npermission). Then submit `https://<host>/sitemap.xml`. Record the property in\n`brief/seo.md`. After launch, `import_gsc_performance` reads page clicks and\nimpressions into the URL inventory.\n\n### 9. Publish and check\n\nWith the user's approval:\n\n```\nread_site_readiness\ntrigger_deploy\nget_deploy_status job_id=<id>\nread_site_readiness\n```\n\nRun the report again after the publication. It reads saved content and\nsettings: the AI crawler zone check needs the site's website host, and a Search\nConsole property verified by DNS is not visible to Typeroll, so confirm it in\nSearch Console. Fix or record every open item, and save the result under the\nstarter's `qa/` folder. In the portal, the site's overview page has the same\nreport under **Launch readiness → Check readiness**. It runs on request, not\nafter every publication.\n\n## Pitfalls\n\n- **Don't stuff keywords.** Write descriptions for people. Google ignores\n `<meta name=\"keywords\">`, and Typeroll has no such field.\n- **JSON-LD is a string.** Pass the whole schema as a JSON-encoded string in\n `json_ld`. The server escapes `</script` before output.\n- **Share images need absolute URLs.** Media library `cdn_url` values are\n absolute.\n- **FAQ markup must match visible content.** Search engines penalize FAQ\n markup for questions the page does not show.\n- **A site file you write by hand loses.** Don't create Pages named\n `sitemap.xml`, `robots.txt` or `llms.txt`; the publication writes them.\n",
27
- "tr-starter-design": "---\nname: tr-starter-design\ndescription: Reference for the default design new Typeroll sites start with — CSS variables, spacing, radii, container width, header and footer skeletons. Read it when a site is blank or clearly follows these conventions and you need new markup or CSS to fit in; skip it for sites with their own design.\n---\n\n# Starter design system\n\n## Site tokens before block overrides\n\nCore 0.2.106 / template capabilities 0.54.0 adds palette names in all colour\nfields and named typography/spacing steps. Check the connected capability\nversion; on older renderers use `var(--color-surface)` rather than a bare name.\n\nSet colours and font families in site settings, then use named styles and\npalette names in blocks. Do not write hex, rgb or font-family literals in block\ncontent. Prefer `primary`, `secondary`, `accent`, `background`, `surface`, `text`,\n`text_light`, and `on_primary`/`on_secondary`/`on_accent` for text on brand colours.\nUse `surface_hover` for a darker interactive surface (derived automatically\nunless explicitly configured). Existing semantic roles should be reused; a\nnew visual shade is not automatically a new semantic role. For a derived shade\nuse `color-mix(in srgb, var(--color-surface) 92%, var(--color-primary))`.\nFor an additional role not in the native palette, define a named site style\nor a site CSS variable derived from existing palette variables, and document it.\n\nChoose `heading`, `body` or `mono` for fonts. Font families belong only in the\nsite's `fonts` settings. Use type-size steps `xs`, `sm`, `md`, `lg`, `xl`, `2xl`,\n`3xl`; spacing `none`, `xs`, `sm`, `md`, `lg`, `xl`; line height `tight`, `snug`,\n`normal`, `relaxed`, `loose`. Presentation fields accept responsive maps of these\nnames, for example `font_size_px: {mobile: \"md\", desktop: \"lg\"}`. Read the field\nschema: counts, widths and breakpoints are not spacing steps. Pixel values are\nexplicit exceptions, not the default authoring method. Configure scales in\n`design_scales`, then reuse them in role styles and blocks.\n\nRecord deliberate exceptions in `decisions.md`, with source/block, reason and\nreview criteria (for example white text on a photograph). Run `lint_design_tokens`\nbefore launch and after major design changes. It warns, never blocks launch.\nUse the starter's `scripts/typeroll/color_tokens.py` for an exact-match dry run;\nreview the plan before applying it in a dedicated Version. Equal hex values can\nmean different roles: never automatically choose between background and text.\nVerify a primary/surface change in a test Version across header, footer, cards,\nmenus and buttons, then restore the test settings. Do not republish automatically.\n\n\n## Express the brand through settings, not CSS\n\nBrand colours belong in `colors`, font families in `fonts`, sizes and spacing\nin the design scales, and recurring looks in named Styles. Editors can see and\nchange all of these, and every page follows them. Use `custom_css` only for an\nexception recorded in `decisions.md`, and never to load a font a second time,\nrestyle all headings or buttons, or set a hero background image. Run\n`lint_design_tokens` and check the readiness items `duplicate_fonts` and\n`custom_css_overrides` in `read_site_readiness` before launch.\n\nThe CSS variables below are for those recorded exceptions, HTML-mode pages and\ntemplate markup.\n\nA reference for the *default* design that ships with new Typeroll sites.\nThe customer may have replaced it — always inspect the actual header partial\n(`read_partial partial_id=\"header\"`) and an existing page before assuming any\nof this is in use. On a site with its own design, mirror what is there.\n\n## CSS variables\n\nColors (set in site settings `colors`; each key becomes `--color-<key>`,\n`text_light` becomes `--color-text-light`):\n --color-primary brand CTAs, links, accents\n --color-secondary supporting brand color (rarely used)\n --color-accent a third highlight (badges, callouts)\n --color-background page background (the body)\n --color-surface slightly raised areas (header, footer, cards)\n --color-text body copy + headings\n --color-text-light secondary text (captions, meta, footer fine-print)\n\nFor subtle borders/dividers that follow the text color without being heavy,\nuse `color-mix(in srgb, var(--color-text) 8%, transparent)` (6% for very soft).\n\nSpacing scale:\n --spacing-xs (0.25rem) --spacing-sm (0.5rem) --spacing-md (1rem)\n --spacing-lg (2rem) --spacing-xl (4rem)\n\nLayout:\n --container-medium (1080px) Center page content with\n `max-width: var(--container-medium); margin: 0 auto; padding: var(--spacing-md);`\n --container-narrow (720px) and --container-wide (1400px) exist for prose\n and wide layouts.\n\nRadii:\n --radius-sm (0.25rem) --radius-md (0.5rem) --radius-lg (1rem)\n\nTypography (set in site settings `fonts`):\n --font-heading Use for h1-h6 and brand wordmark\n --font-body Default for everything else\n --font-size-base (the rem baseline)\n\nBlock-mode pages get these through the blocks and named styles; reach for the\nvariables in custom CSS, HTML-mode pages and template markup.\n\n## Default header skeleton\n\nSurface-tinted bar with a hairline bottom border. Brand text on the left\nin the heading font, bold, slight negative letter-spacing. Nav on the\nright. Last nav item is typically a primary CTA: `background:\nvar(--color-primary); color: var(--color-background); border-radius:\nvar(--radius-md)`.\n\n## Default footer skeleton\n\nThree-column responsive grid (brand+tagline / Site links / Get in touch),\nthen a fine-print row with copyright + Typeroll attribution. Top border\nuses the same color-mix() recipe as the header.\n\n## When to use this\n\n- A brand new site, or one where the header partial still matches this\n layout.\n- A page or block where the customer wants something that \"fits the rest\n of the site\" and the rest follows these conventions.\n\n## When NOT to use this\n\n- The customer has a totally different design (e.g. dark mode, custom\n utility classes, no CSS variables, migrated theme).\n- The customer says \"use this brand color\" — honor their literal request\n instead of substituting a CSS variable.\n- Mid-edit on an existing page that doesn't follow these conventions —\n match what's already there.\n- Choosing a new palette or fonts is brand work (the MCP recipe `tr-brand`),\n not this reference.\n\n## Fluid typography and component rhythm\n\nCore 0.2.114 / MCP 0.45.85 / capabilities 0.55.0 adds responsive scales.\nCheck the connected versions before using this contract. New sites use render\nversion 10. For an existing site, test a Version first; upgrading rendering\nand replacing existing roles are separate, deliberate choices.\n\nUse `fonts.size_base` (default 16), `typography.ratio_mobile` (1.2),\n`typography.ratio_desktop` (1.25), `typography.rhythm` (1), and\n`typography.line_length` (65 ch). Set the controls once, then use named type,\nspacing and line-height steps. `apply_standard_styles` uses those steps;\n`overwrite: true` resets existing roles, so review their current values first.\nExplicit sizes and breakpoint overrides still win and are not silently migrated.\nA template that owns its text columns sets `typography.line_length` to `\"none\"`:\nprose then fills its column, with no `--measure-prose` custom CSS.\n\nHeading role margins belong to editorial flow. Component titles use their own\npadding/gap, and opening headings in containers/sections add no top margin.\nUse role-linked `core/heading` size `auto` or `theme`; explicit hero sizes remain\ndeliberate exceptions. Do not compensate with per-card negative margins.\nCompare 375, 768 and 1280px in Site settings → Design and in a full site preview.\nAfter a rendering upgrade/rebuild, recheck cards, boxed headings, leading text\nand webfonts. Boxes should get their outer air from padding. Keep exceptions\nin decisions.md, and run lint_design_tokens before launch.\n",
27
+ "tr-starter-design": "---\nname: tr-starter-design\ndescription: Reference for the default design new Typeroll sites start with — CSS variables, spacing, radii, container width, header and footer skeletons. Read it when a site is blank or clearly follows these conventions and you need new markup or CSS to fit in; skip it for sites with their own design.\n---\n\n# Starter design system\n\n## Site tokens before block overrides\n\nCore 0.2.106 / template capabilities 0.54.0 adds palette names in all colour\nfields and named typography/spacing steps. Check the connected capability\nversion; on older renderers use `var(--color-surface)` rather than a bare name.\n\nSet colours and font families in site settings, then use named styles and\npalette names in blocks. Do not write hex, rgb or font-family literals in block\ncontent. Prefer `primary`, `secondary`, `accent`, `background`, `surface`, `text`,\n`text_light`, and `on_primary`/`on_secondary`/`on_accent` for text on brand colours.\nUse `surface_hover` for a darker interactive surface (derived automatically\nunless explicitly configured). Existing semantic roles should be reused; a\nnew visual shade is not automatically a new semantic role. For a derived shade\nuse `color-mix(in srgb, var(--color-surface) 92%, var(--color-primary))`.\nFor an additional role not in the native palette, define a named site style\nor a site CSS variable derived from existing palette variables, and document it.\n\nChoose `heading`, `body` or `mono` for fonts. Font families belong only in the\nsite's `fonts` settings. Use type-size steps `xs`, `sm`, `md`, `lg`, `xl`, `2xl`,\n`3xl`; spacing `none`, `xs`, `sm`, `md`, `lg`, `xl`; line height `tight`, `snug`,\n`normal`, `relaxed`, `loose`. Presentation fields accept responsive maps of these\nnames, for example `font_size_px: {mobile: \"md\", desktop: \"lg\"}`. Read the field\nschema: counts, widths and breakpoints are not spacing steps. Pixel values are\nexplicit exceptions, not the default authoring method. Configure scales in\n`design_scales`, then reuse them in role styles and blocks.\n\nRecord deliberate exceptions in `decisions.md`, with source/block, reason and\nreview criteria (for example white text on a photograph). Run `lint_design_tokens`\nbefore launch and after major design changes. It warns, never blocks launch.\nUse the starter's `scripts/typeroll/color_tokens.py` for an exact-match dry run;\nreview the plan before applying it in a dedicated Version. Equal hex values can\nmean different roles: never automatically choose between background and text.\nVerify a primary/surface change in a test Version across header, footer, cards,\nmenus and buttons, then restore the test settings. Do not republish automatically.\n\n\n## Express the brand through settings, not CSS\n\nBrand colours belong in `colors`, font families in `fonts`, sizes and spacing\nin the design scales, and recurring looks in named Styles. Editors can see and\nchange all of these, and every page follows them. Use `custom_css` only for an\nexception recorded in `decisions.md`, and never to load a font a second time,\nrestyle all headings or buttons, or set a hero background image. Run\n`lint_design_tokens` and check the readiness items `duplicate_fonts` and\n`custom_css_overrides` in `read_site_readiness` before launch.\n\nThe CSS variables below are for those recorded exceptions, HTML-mode pages and\ntemplate markup.\n\nA reference for the *default* design that ships with new Typeroll sites.\nThe customer may have replaced it — always inspect the actual header partial\n(`read_partial partial_id=\"header\"`) and an existing page before assuming any\nof this is in use. On a site with its own design, mirror what is there.\n\n## CSS variables\n\nColors (set in site settings `colors`; each key becomes `--color-<key>`,\n`text_light` becomes `--color-text-light`):\n --color-primary brand CTAs, links, accents\n --color-secondary supporting brand color (rarely used)\n --color-accent a third highlight (badges, callouts)\n --color-background page background (the body)\n --color-surface slightly raised areas (header, footer, cards)\n --color-text body copy + headings\n --color-text-light secondary text (captions, meta, footer fine-print)\n\nFor subtle borders/dividers that follow the text color without being heavy,\nuse `color-mix(in srgb, var(--color-text) 8%, transparent)` (6% for very soft).\n\nSpacing scale:\n --spacing-xs (0.25rem) --spacing-sm (0.5rem) --spacing-md (1rem)\n --spacing-lg (2rem) --spacing-xl (4rem)\n\nLayout:\n --container-medium (1080px) Center page content with\n `max-width: var(--container-medium); margin: 0 auto; padding: var(--spacing-md);`\n --container-narrow (720px) and --container-wide (1400px) exist for prose\n and wide layouts.\n\nRadii:\n --radius-sm (0.25rem) --radius-md (0.5rem) --radius-lg (1rem)\n\nTypography (set in site settings `fonts`):\n --font-heading Use for h1-h6 and brand wordmark\n --font-body Default for everything else\n --font-size-base (the rem baseline)\n\nBlock-mode pages get these through the blocks and named styles; reach for the\nvariables in custom CSS, HTML-mode pages and template markup.\n\n## Default header skeleton\n\nSurface-tinted bar with a hairline bottom border. Brand text on the left\nin the heading font, bold, slight negative letter-spacing. Nav on the\nright. Last nav item is typically a primary CTA: `background:\nvar(--color-primary); color: var(--color-background); border-radius:\nvar(--radius-md)`.\n\n## Default footer skeleton\n\nThree-column responsive grid (brand+tagline / Site links / Get in touch),\nthen a fine-print row with copyright + Typeroll attribution. Top border\nuses the same color-mix() recipe as the header.\n\n## When to use this\n\n- A brand new site, or one where the header partial still matches this\n layout.\n- A page or block where the customer wants something that \"fits the rest\n of the site\" and the rest follows these conventions.\n\n## When NOT to use this\n\n- The customer has a totally different design (e.g. dark mode, custom\n utility classes, no CSS variables, migrated theme).\n- The customer says \"use this brand color\" — honor their literal request\n instead of substituting a CSS variable.\n- Mid-edit on an existing page that doesn't follow these conventions —\n match what's already there.\n- Choosing a new palette or fonts is brand work (the MCP recipe `tr-brand`),\n not this reference.\n\n## Fluid typography and component rhythm\n\nCore 0.2.114 / MCP 0.45.85 / capabilities 0.55.0 adds responsive scales.\nCheck the connected versions before using this contract. New sites use render\nversion 10. For an existing site, test a Version first; upgrading rendering\nand replacing existing roles are separate, deliberate choices.\n\nUse `fonts.size_base` (default 16), `typography.ratio_mobile` (1.2),\n`typography.ratio_desktop` (1.25), `typography.rhythm` (1), and\n`typography.line_length` (65 ch). Set the controls once, then use named type,\nspacing and line-height steps. `apply_standard_styles` uses those steps;\n`overwrite: true` resets existing roles, so review their current values first.\nExplicit sizes and breakpoint overrides still win and are not silently migrated.\nA template that owns its text columns sets `typography.line_length` to `\"none\"`:\nprose then fills its column, with no `--measure-prose` custom CSS.\n\nHeading role margins belong to editorial flow. Component titles use their own\npadding/gap, and opening headings in containers/sections add no top margin.\nUse role-linked `core/heading` size `auto` or `theme`; explicit hero sizes remain\ndeliberate exceptions. Do not compensate with per-card negative margins.\nCompare 375, 768 and 1280px in Site settings → Design and in a full site preview.\nAfter a rendering upgrade/rebuild, recheck cards, boxed headings, leading text\nand webfonts. Boxes should get their outer air from padding. Keep exceptions\nin decisions.md, and run lint_design_tokens before launch.\n\n\n## Shared page endings\n\nFrom Core 0.3.40 / MCP 0.45.145, prefer site `footer_spacing`, for example\n`{\"mobile\":\"lg\",\"laptop\":\"xl\"}`, over copying bottom padding into every Page.\nInspect the final block and Page template first: explicit bottom/vertical\npadding, spacing-after and selected style spacing win, including zero. Remove\nthat override when the page should inherit. For an intentional full-bleed\nending, set the Page's `footer_spacing` to `none` and record the decision.\nCheck `layout_warnings` after Save; `footer_spacing_zero` identifies an explicit\nzero next to text/form content. Verify mobile and desktop before publishing.\n",
28
28
  "tr-upgrade-rendering": "---\nname: tr-upgrade-rendering\ndescription: Use when a site's platform render version is behind the latest (read_site_settings → render.version < render.latest), or the user asks to \"upgrade rendering\", \"get the new block styles\" or why a platform improvement doesn't show. Compares every page at the current and target version with screenshots, reports the differences and upgrades only with approval.\n---\n\n# Upgrade a site's render version\n\nPlatform changes to block markup and shared CSS ship as numbered render\nversions. A site keeps its version until someone upgrades it, so its look\nnever changes on its own. Upgrading is a single settings write, reversible by\nwriting the previous number. The comparison happens here, in the agent; the\nserver only renders previews.\n\nThe user can also do this in the portal: Settings → Rendering → \"Preview with\nversion N\", then \"Upgrade\". Offer this skill when they want a full-site visual\ncomparison first.\n\n## Recipe\n\n1. **Read the gap.** `read_site_settings` returns `render`:\n `{ version, latest, upgrades: [{ version, title, changes[] }] }`. If\n `version === latest`, stop. Tell the user what each pending version\n changes, in their words, before measuring anything.\n\n2. **List the pages to compare.** `list_pages` (published and unlisted), plus\n the header/footer, which appear on every page. For a large site, compare\n the home page, one page per content type and template, and every page\n whose blocks use a component named in `upgrades[].changes`.\n\n3. **Mint two links per page set, before upgrading.** One `get_preview_link`\n without `render_version` (current) and one with `render_version: latest`\n (target). Both show saved content. Mint each once and reuse it; internal\n links keep the token. Put the page's path in each link (`page_id` or\n `slug`) and capture its `frame_url` (mint with `include_frame_url: true`), the\n rendered page without the preview wrapper. Compare these two, never the live site after the upgrade: once\n upgraded and published, the old look is gone and regressions hide in it.\n\n4. **Screenshot both** at 390, 768 and 1440 px wide, full page, after fonts\n and images have loaded (`document.fonts.ready`, scroll to the end to\n trigger lazy images, then back to the top). Use a headless browser with a\n fixed viewport and `reducedMotion: 'reduce'`. Also record computed boxes\n (top, height, margin, padding, gap) of each section and heading, for\n example with the starter's `layout_trace.cjs`. On your own computer, load\n pages slowly; home connections can throttle many rapid requests (the\n starter's browser tools pace page loads). Use a cloud session for large sites.\n\n5. **Compare.** Pixel-diff each pair (same size, small per-pixel tolerance)\n and record the changed area and the bounding boxes of changed regions.\n Crop each region from both versions. Compare the computed boxes too: a\n vertical shift (content moved up or down) is a difference even when each\n block looks the same. Ignore differences confined to embedded third-party\n frames (maps, booking widgets, video).\n\n6. **Report** per page and width: unchanged, or the cropped before/after\n regions with a one-line description (\"links in body text are underlined\",\n \"section gap 8px larger\"). Link each change to the version note that\n explains it. Say plainly when a change looks like a regression.\n\n Before screenshots, read the site and page custom CSS for selectors a\n version note names. Version 2 moves a heading's or button's custom class\n onto the `<h2>` or link, so `.my-class .block-heading-text` stops\n matching; propose the rewrite (`.my-class`) or a named style.\n Version 16 wraps a form's buttons in `.form-actions`, so CSS that placed\n the button in the form grid targets `form > .form-actions`. Version 17\n loads weights written in CSS: propose removing `fonts.load` entries that\n only existed for them, and element rules that were scoped only to keep\n them off the cookie banner. Version 19 moves the cookie banner's reopen\n control from the floating \"Cookies\" button to a \"Cookie settings\" link at\n the end of the footer, unless the footer already links to\n `#cookie-settings`: check the footer bottom at every width, remove CSS that\n only moved or hid `.tr-consent__manage`, and ask whether the user wants\n `cookie_consent.manage_button: \"floating\"` to keep the button. Any rule that targets platform markup\n (`.block-section-inner`, `[data-block=...]` internals) can change with a\n render version: prefer block settings and named styles, and re-check such\n rules at all three widths after the upgrade.\n\n7. **Ask before upgrading.** Never upgrade on your own. If the user wants to\n keep a specific old look, solve it with a site style or page CSS first and\n compare again.\n\n8. **Upgrade** with `update_site_settings render_version: <latest>` (pass\n `version` to do it on a branch first). The preview changes at once; the\n live site changes at the next deploy. Run `trigger_deploy` with\n `dry_run: true` and read `get_publication_impact` first: the deploy also\n ships every other saved change. To undo, write the previous number.\n\n## Platform fixes behind a newer version\n\nWhen a layout defect is fixed in a newer render version (for example version\n12: constrained containers fill column layouts), the fix is to raise\n`render_version` through steps 3–8 — compare, report, upgrade with approval,\nthen publish. Do not work around it in content (extra wrappers, widths,\npaddings or custom CSS); those workarounds outlive the fix and fight it.\n\n## Pitfalls\n\n- Comparing a draft against saved content shows content edits, not\n rendering changes. Use the same content state for both links.\n- Lazy images and web fonts cause false differences. Wait for them in both\n screenshots.\n- Comparing only the home page misses changes in components it doesn't use.\n- Comparing against the live site after upgrading hides regressions: the\n baseline is gone. Capture both previews before the upgrade.\n- Don't encode a workaround in custom CSS to resist an upgrade without\n telling the user; it becomes a hidden fork of the platform styles.\n"
29
29
  };
30
30
  export const BUNDLED_WORKSPACE_TEMPLATES = {
31
31
  "brief/interview.md": "# Interview progress\n\nStatus: not started\nNext question: goal and scope\n\n## Confirmed answers\n\n| Topic | Answer | Source/date | Brief location |\n| --- | --- | --- | --- |\n\n## Proposals and unknowns\n\nRecord what is not yet decided, whether it blocks the next step and who can decide.\n\n## Recap and approved next step\n\nRecord the owner's confirmation, exact scope and date. Do not infer deployment,\nDNS or message approval from a completed brief. No secrets or raw private transcripts.\n",
32
32
  "brief/migration.md": "# Migration brief (when applicable)\n\n## Independent choices\n\n- text_intent: undecided (preserve or renew)\n- design_intent: undecided (preserve or renew; includes images)\n\nThese are planning labels, not API parameters. Choose each separately. If guidance\nis needed, use workflows/interview.md. A single \"renew\" must not silently authorize\nboth. Expand an older single-choice brief with the owner before dependent writes.\n\n## Source URLs, date and agreed scope\n\n## Text policy and exceptions\n\nPreserve wording, headings, CTAs and captions when text_intent is preserve. Record\nSEO metadata/alt text, legal copy, translation and page-specific exceptions explicitly.\nFor renewal, record the approved editorial brief and facts that must remain true.\n\n## Design and image policy and exceptions\n\nRecord layout/brand references, required logos/assets, permitted replacements or\ngeneration, cropping, rights and credits. Design renewal alone never permits text\nrewriting. Preserve image motifs unless a replacement is agreed; format/size\noptimization does not mean changing the image's content.\n\n## Acceptance references\n\nText: original source for preserve; approved editorial brief for renew.\nDesign/images: original source for preserve; approved design/prototypes for renew.\nRecord these separately per layout or page when exceptions apply.\n\n## Standard blocks, custom types and HTML exceptions\n\n## Old URL to preserved path or relevant redirect\n\nBoth choices retain URL continuity, source facts and required business behavior.\n\n## Prototype and verification evidence\n\nRecord text, design/images, links and behavior results separately. Keep private\nextracts in sources/private/ and screenshots in qa/reports/.\n",
33
33
  "pages/README.md": "# Internal Page notes\n\nKeep internal sources, decisions, comments and dated history in this repository,\nnot in public CMS fields. The CMS remains the source of current content; notes\nare editorial context, never a second content copy. Keep this workspace private\nif notes contain private information. Never put credentials or signed URLs here.\nDo not include pages/ in static output, content imports or public source bundles.\n\nOne file per stable Page ID: pages/<encoded-page-id>.md. The helper percent-encodes\nIDs that contain path characters. URLs and titles can change without renaming notes.\nUse a separate workspace/Git branch for another Site or Version; the generated\nfacts are bound to portal, Organization, Site and Version and reject mismatches.\n\nEach note has review, next_review (YYYY-MM or YYYY-MM-DD), last_checked and\nresponsible metadata, followed by Purpose, Sources (including date and whether an\nowner statement), Publishing considerations, Open questions and Log. Use dated\nchange, decision, comment and check entries; keep the newest first. Site-wide\nrules belong in decisions.md, referenced from the relevant notes.\n\nChoose a review cadence for the project, for example quarterly, annual, event-led\nor when source facts change. There is no default season or automatic review date.\nRefreshing facts never changes last_checked or next_review. Set those only after\nan actual review. index.md sorts scheduled reviews first, then unscheduled Pages.\n\nThe generated block contains saved CMS metadata and candidate links from the saved\nbody. It does not inspect template/partial links, JavaScript or final rendering;\nquery-bearing URLs are omitted to avoid copying credentials. Check the rendered\nPage and every external link during review. Sources, historical import statistics\nand their dates belong in the human sections, not invented by the script.\n\nRun scripts/typeroll/page_notes.py --dry-run, inspect, then omit --dry-run to refresh.\n--migration-inventory optionally includes recorded redirect sources. Run from the\nworkspace root with a privately injected TYPEROLL_API_KEY. No CMS writes occur.\nOnly the generated markers and index.md are refreshed; malformed markers fail\nwithout overwriting notes. Reconcile existing notes manually before adopting the\nnew marker/scope format; do not replace an established project's editorial history.\n\nNotes without a Page are reported, never deleted automatically. Confirm deletion\nand any redirect, add a final log entry, then move the note to pages/archived/.\nDo not archive just because an API call failed or access changed.\n",
34
- "qa/checklist.md": "# Verification\n\n- Confirm Organization, Site, Version and deployed/source identity.\n- Run `python3 scripts/typeroll/check_unsaved.py` before trigger_deploy. Review\n and explicitly save authorized Pages and partials; templates save immediately.\n- Then run `trigger_deploy` with `dry_run: true` and read `get_publication_impact`.\n A publication ships everything saved on the Site, including other people's and\n other sessions' changes. Stop and find out about any change you did not make.\n- Review your own edits with `get_preview_link` `include_working_copy: true` for\n the changed Page (`page_id` or `slug`); use its `frame_url` for screenshots.\n- After switching an app version, dry-run and publish soon: the live site keeps\n the version it was published with until the next publication.\n- Publish one Site at a time per Organization (shared build engine): start the\n next only when the previous job finished and read_organization_build_engine\n shows no active_jobs.\n- Compare preserved text with capture_text.cjs + compare_text.py and an explicit\n selector. Check intentional additions, source comments and images separately.\n- Inspect desktop/mobile previews and actual hosted output around breakpoints.\n Use shootframe.cjs / shoot_hosted.cjs and inspect full screenshots, not only tiles.\n- Use the signed preview for content/layout review only: it is a sandboxed,\n opaque-origin frame. Verify third-party embeds, consent, analytics, cookies,\n fonts and measured design checks on the published test address.\n- Exercise menus, keyboard focus, current links, forms and enabled app states.\n Use card-stacking-check.cjs for whole-card excerpt/media/whitespace targets.\n- Check actual contrast on light/dark/photo backgrounds, image subjects and\n sharpness, footer balance, left-aligned last rows and heading hierarchy.\n- Check home title/suffix, metadata, canonical/indexing policy and JSON-LD.\n- Run check_url_parity.py and check_assets.py on the deployed candidate; compare\n final targets with the approved URL map and flatten accidental redirect chains.\n- On your own computer, keep the scripts' local request profile: home ISPs,\n routers and DNS can throttle rapid requests. Run full-site checks, URL parity\n and screenshot runs on large sites in a cloud session (scripts/README.md).\n- A migration is finished only when no media or Page has failed, or each failure\n is reviewed and accepted in brief/migration.md. After publication, check the\n live Pages' images once.\n- Treat 403/network/DNS failures as unverified. Do not claim search-bot access\n from a user-agent string or turn off customer protection without approval.\n- Record tested pages, viewports, revision, results and unresolved issues per QA\n round. Record product defects in qa/typeroll-platform-feedback.md.\n- Keep screenshots and private runtime reports in ignored qa/reports/.\n- Check publishing readiness and migration launch report. Passing technical\n validation does not prove visual/editorial completeness or grant launch approval.\n\n## Launch\n\nRun this before the first production publication, again after it, and after\nmajor changes. The report covers the whole site; it warns and never blocks.\n\n- [ ] Run `read_site_readiness` on the confirmed Site and Version.\n- [ ] Fix each `warning` and `suggestion` with the tool its `fix` names, or\n record in decisions.md why it stays open. A missing default share image is a\n suggestion; leave it when the owner chose to skip it.\n- [ ] Save the result as qa/launch-readiness.md: date, Site, Version, deployed\n revision, each open item with its decision, and the next review date.\n- [ ] After publication, run it again. It reads saved content and settings, so\n confirm in Search Console itself that the property is verified and the\n sitemap is submitted, and record the date in brief/seo.md.\n- [ ] Keep `get_migration_launch_report` as the separate gate for migrations.\n\nCommands/dependencies/limits: scripts/README.md. Design: workflows/design.md.\nFollow existing owner authorization; test publication, traffic cutover and\nindexing have distinct effects but do not require repeated approval if covered.\n\n\n- [ ] Check heading role spacing, slot gap and responsive vertical padding in the browser.\n- [ ] Review global/current navigation colors against the real parent background.\n- [ ] Check intrinsic-width image and full-image hero framing at breakpoint boundaries.\n- [ ] Test click-to-load video with keyboard; no provider request before activation.\n- [ ] Review matched drafts, unpublished targets and redirect chains before launch.\n- [ ] Explicitly save working copies, or obtain approval to publish saved content only.\n\n## Design tokens (Core 0.2.106+)\n\n- [ ] Run `lint_design_tokens` before launch and after major design changes.\n- [ ] Review hardcoded colours, fonts and sizes; record justified exceptions in decisions.md.\n- [ ] Dry-run colour migration; do not infer semantic roles from equal hex values.\n- [ ] Change primary and surface in a test Version: header, footer, cards, menus and buttons follow without block edits at mobile/tablet/desktop widths. Restore the test settings.\n- [ ] Report actual versus simulated before/after counts separately; do not claim a migration was applied from a dry run.\n\n- [ ] Before source retirement, review workflows/source-media.md: unused originals,\n print files, private archive manifest, verified copies and a restore test.\n- [ ] Review ICC-converted derivatives visually; preserve originals separately.\n- [ ] Verify Analytics configuration and actual beacon/cookie behavior after build.\n- [ ] Fonts on the published address: `/_typeroll/fonts/fonts.css` has `@font-face`\n rules for each chosen family, every font file returns 200, no request goes to\n fonts.googleapis.com/fonts.gstatic.com, and `document.fonts` shows each family loaded.\n- [ ] Read domain publication intent before deployment; distinguish test-host\n updates, future-host candidates and explicit traffic approval.\n- [ ] Inspect the frozen candidate's noindex/robots output, not only current CMS settings.\n- [ ] Review owner facts and dates against the chosen preserve/renew text policy.\n\n## Internal Page notes\n\nFollow workflows/page-notes.md and pages/README.md. Create notes during migration,\nread before edits, update afterward, check external links at each editorial review,\nand archive notes for confirmed removed Pages under pages/archived/. Refreshing\ngenerated facts never counts as a completed review. Keep notes out of public output.\n\n- Before a render-version upgrade, screenshot 390, 768 and 1440px and record\n computed boxes from a preview at the current version and one at the target\n `render_version`. Compare those two; comparing the live site after the upgrade\n hides regressions. Vertical shifts count as differences. Re-check site or Page\n CSS that targets platform markup (`.block-section-inner`, `[data-block]` internals).\n- After a Core rendering upgrade, compare typography and spacing at 375, 768\n and 1280px. Opening headings in cards, boxes and sections must not add the\n editorial heading's top margin. Check actual fonts as well as the Site settings\n scale preview. Run `node scripts/typeroll/check_heading_spacing.cjs <origin>`\n and review deliberate exceptions in decisions.md.\n\n### Sharing metadata\n\nCompare saved full source and deployed target HTML with\n`python3 scripts/typeroll/compare_seo.py qa/source.html qa/target.html`.\nThe report includes document metadata, `og:image`, `og:title`,\n`og:description` and Twitter tags, including missing and duplicate tags.\nRecord intentional differences; an image URL changed by migration needs review\nagainst the media mapping, not automatic approval. This script does not fetch\npages or change content. Keep source snapshots free of private data.\n\nFrom Core 0.2.120 / MCP 0.45.90, preserve distinct sharing text in Page\n`og_title` and `og_description`. Empty fields use SEO metadata. The public\ncontent-type field mapped to Schema.org `image` supplies the image after\n`og_image`, before site defaults. Its `<field>_alt` supplies the image description\nwhen public; `seo_image_alt` is the explicit override. Never copy a site logo\ninto every Page merely to reproduce an old fallback.\n\n\n### Bulk content and image edits\n\n- Send only changed fields. Use `batch_update_pages` for Page-specific edits,\n inspect each result and retry only failed entries. Review earlier drafts before save.\n- For a library-wide `replace_media`, review the dry run and all-version scope;\n inspect preview image proportions, crops and editorial alt text before publishing.\n The replacement leaves saved Page bodies and the current live publication intact.\n",
34
+ "qa/checklist.md": "# Verification\n\n- Confirm Organization, Site, Version and deployed/source identity.\n- Run `python3 scripts/typeroll/check_unsaved.py` before trigger_deploy. Review\n and explicitly save authorized Pages and partials; templates save immediately.\n- Then run `trigger_deploy` with `dry_run: true` and read `get_publication_impact`.\n A publication ships everything saved on the Site, including other people's and\n other sessions' changes. Stop and find out about any change you did not make.\n- Review your own edits with `get_preview_link` `include_working_copy: true` for\n the changed Page (`page_id` or `slug`); use its `frame_url` for screenshots.\n- After switching an app version, dry-run and publish soon: the live site keeps\n the version it was published with until the next publication.\n- Publish one Site at a time per Organization (shared build engine): start the\n next only when the previous job finished and read_organization_build_engine\n shows no active_jobs.\n- Compare preserved text with capture_text.cjs + compare_text.py and an explicit\n selector. Check intentional additions, source comments and images separately.\n- Inspect desktop/mobile previews and actual hosted output around breakpoints.\n Use shootframe.cjs / shoot_hosted.cjs and inspect full screenshots, not only tiles.\n- Use the signed preview for content/layout review only: it is a sandboxed,\n opaque-origin frame. Verify third-party embeds, consent, analytics, cookies,\n fonts and measured design checks on the published test address.\n- Exercise menus, keyboard focus, current links, forms and enabled app states.\n Use card-stacking-check.cjs for whole-card excerpt/media/whitespace targets.\n- Check actual contrast on light/dark/photo backgrounds, image subjects and\n sharpness, footer balance, left-aligned last rows and heading hierarchy.\n- Check the gap before the footer on text, article and form pages at mobile and\n desktop widths. Prefer shared `footer_spacing` (Core 0.3.40+) and review\n `footer_spacing_zero` save warnings; record intentional edge-to-edge endings.\n- Check home title/suffix, metadata, canonical/indexing policy and JSON-LD.\n- Run check_url_parity.py and check_assets.py on the deployed candidate; compare\n final targets with the approved URL map and flatten accidental redirect chains.\n- On your own computer, keep the scripts' local request profile: home ISPs,\n routers and DNS can throttle rapid requests. Run full-site checks, URL parity\n and screenshot runs on large sites in a cloud session (scripts/README.md).\n- A migration is finished only when no media or Page has failed, or each failure\n is reviewed and accepted in brief/migration.md. After publication, check the\n live Pages' images once.\n- Treat 403/network/DNS failures as unverified. Do not claim search-bot access\n from a user-agent string or turn off customer protection without approval.\n- Record tested pages, viewports, revision, results and unresolved issues per QA\n round. Record product defects in qa/typeroll-platform-feedback.md.\n- Keep screenshots and private runtime reports in ignored qa/reports/.\n- Check publishing readiness and migration launch report. Passing technical\n validation does not prove visual/editorial completeness or grant launch approval.\n\n## Launch\n\nRun this before the first production publication, again after it, and after\nmajor changes. The report covers the whole site; it warns and never blocks.\n\n- [ ] Run `read_site_readiness` on the confirmed Site and Version.\n- [ ] Fix each `warning` and `suggestion` with the tool its `fix` names, or\n record in decisions.md why it stays open. A missing default share image is a\n suggestion; leave it when the owner chose to skip it.\n- [ ] Save the result as qa/launch-readiness.md: date, Site, Version, deployed\n revision, each open item with its decision, and the next review date.\n- [ ] After publication, run it again. It reads saved content and settings, so\n confirm in Search Console itself that the property is verified and the\n sitemap is submitted, and record the date in brief/seo.md.\n- [ ] Keep `get_migration_launch_report` as the separate gate for migrations.\n\nCommands/dependencies/limits: scripts/README.md. Design: workflows/design.md.\nFollow existing owner authorization; test publication, traffic cutover and\nindexing have distinct effects but do not require repeated approval if covered.\n\n\n- [ ] Check heading role spacing, slot gap and responsive vertical padding in the browser.\n- [ ] Review global/current navigation colors against the real parent background.\n- [ ] Check intrinsic-width image and full-image hero framing at breakpoint boundaries.\n- [ ] Test click-to-load video with keyboard; no provider request before activation.\n- [ ] Review matched drafts, unpublished targets and redirect chains before launch.\n- [ ] Explicitly save working copies, or obtain approval to publish saved content only.\n\n## Design tokens (Core 0.2.106+)\n\n- [ ] Run `lint_design_tokens` before launch and after major design changes.\n- [ ] Review hardcoded colours, fonts and sizes; record justified exceptions in decisions.md.\n- [ ] Dry-run colour migration; do not infer semantic roles from equal hex values.\n- [ ] Change primary and surface in a test Version: header, footer, cards, menus and buttons follow without block edits at mobile/tablet/desktop widths. Restore the test settings.\n- [ ] Report actual versus simulated before/after counts separately; do not claim a migration was applied from a dry run.\n\n- [ ] Before source retirement, review workflows/source-media.md: unused originals,\n print files, private archive manifest, verified copies and a restore test.\n- [ ] Review ICC-converted derivatives visually; preserve originals separately.\n- [ ] Verify Analytics configuration and actual beacon/cookie behavior after build.\n- [ ] Fonts on the published address: `/_typeroll/fonts/fonts.css` has `@font-face`\n rules for each chosen family, every font file returns 200, no request goes to\n fonts.googleapis.com/fonts.gstatic.com, and `document.fonts` shows each family loaded.\n- [ ] Read domain publication intent before deployment; distinguish test-host\n updates, future-host candidates and explicit traffic approval.\n- [ ] Inspect the frozen candidate's noindex/robots output, not only current CMS settings.\n- [ ] Review owner facts and dates against the chosen preserve/renew text policy.\n\n## Internal Page notes\n\nFollow workflows/page-notes.md and pages/README.md. Create notes during migration,\nread before edits, update afterward, check external links at each editorial review,\nand archive notes for confirmed removed Pages under pages/archived/. Refreshing\ngenerated facts never counts as a completed review. Keep notes out of public output.\n\n- Before a render-version upgrade, screenshot 390, 768 and 1440px and record\n computed boxes from a preview at the current version and one at the target\n `render_version`. Compare those two; comparing the live site after the upgrade\n hides regressions. Vertical shifts count as differences. Re-check site or Page\n CSS that targets platform markup (`.block-section-inner`, `[data-block]` internals).\n- After a Core rendering upgrade, compare typography and spacing at 375, 768\n and 1280px. Opening headings in cards, boxes and sections must not add the\n editorial heading's top margin. Check actual fonts as well as the Site settings\n scale preview. Run `node scripts/typeroll/check_heading_spacing.cjs <origin>`\n and review deliberate exceptions in decisions.md.\n\n### Sharing metadata\n\nCompare saved full source and deployed target HTML with\n`python3 scripts/typeroll/compare_seo.py qa/source.html qa/target.html`.\nThe report includes document metadata, `og:image`, `og:title`,\n`og:description` and Twitter tags, including missing and duplicate tags.\nRecord intentional differences; an image URL changed by migration needs review\nagainst the media mapping, not automatic approval. This script does not fetch\npages or change content. Keep source snapshots free of private data.\n\nFrom Core 0.2.120 / MCP 0.45.90, preserve distinct sharing text in Page\n`og_title` and `og_description`. Empty fields use SEO metadata. The public\ncontent-type field mapped to Schema.org `image` supplies the image after\n`og_image`, before site defaults. Its `<field>_alt` supplies the image description\nwhen public; `seo_image_alt` is the explicit override. Never copy a site logo\ninto every Page merely to reproduce an old fallback.\n\n\n### Bulk content and image edits\n\n- Send only changed fields. Use `batch_update_pages` for Page-specific edits,\n inspect each result and retry only failed entries. Review earlier drafts before save.\n- For a library-wide `replace_media`, review the dry run and all-version scope;\n inspect preview image proportions, crops and editorial alt text before publishing.\n The replacement leaves saved Page bodies and the current live publication intact.\n",
35
35
  "qa/typeroll-platform-feedback.md": "# Platform feedback\n\nRecord Typeroll product defects and gaps here, without credentials or private\nexports. Distinguish bugs, missing capabilities, unclear instructions and\nproject choices; project choices belong in decisions.md.\n\nIndex:\n\n| ID | Site / Organization | Surface | Summary | Blocks launch | Status |\n| --- | --- | --- | --- | --- | --- |\n\nOne entry per finding:\n\n```markdown\n## DE-03 — <short title>\n\n- Site / Organization / Version: <names and IDs>\n- Core / MCP version: <from /api/version or get_site_capabilities>\n- Tool or surface: <e.g. trigger_deploy, get_preview_link, core/container>\n- Observed: <what happened, with exact error codes, job IDs, URLs, widths and\n timestamps; minimal reproduction; expected versus actual>\n- Impact: <what is blocked or wrong, and for whom>\n- Ask: <the product change requested>\n- Acceptance criteria: <checks that prove it is fixed>\n- Workaround: <none, or what was done and how to remove it later>\n- Status: open | fixed in <version> | verified <date, version, result>\n```\n\nPrefix IDs per site or market (for example DE-03) and never reuse one.\n\nAfter reporting a defect that affects publishing, do not resume the affected\npublishing until the fix is confirmed live: check `/api/version` or the release\nnote for the fixed version. Then retest against the acceptance criteria and\nrecord the result and version under Status. Verify deployed output before\nclosing a finding.\n",
36
36
  "scripts/README.md": "# Repeatable site QA\n\nThese optional tools supplement MCP and the platform's publication validator.\nThey do not publish, change DNS, approve a launch or replace visual review.\nPython tools use the standard library except contact_sheet.py (Pillow). Browser\ntools require Node.js 22+, Playwright and its Chromium browser. From scripts/typeroll:\n\n```sh\nnpm install --no-save --package-lock=false playwright\nnpx playwright install chromium\n```\n\nRun the commands below from the **workspace root**. Inject TYPEROLL_API_KEY through\nyour private credential manager. Never put it in a file or command argument.\ntrlib.py reads portal, organization_id, site_id and version from typeroll.json,\nsends the key only to https://app.typeroll.com or to a portal you confirm by\nsetting TYPEROLL_API_URL to the same origin privately, checks the connected Site/Organization, discovers the live tool schema, and\npasses the Version where supported. It refuses unversioned operations on a\nnon-main binding; use the explicit interactive API workflow for organization or\nshared media operations instead. It is a small hosted MCP helper for API keys,\nnot a replacement OAuth client or a new general CRUD CLI. REST is also supported\nby Typeroll if your integration already uses it.\n\n## Request pace: your computer or a cloud session\n\nHome connections throttle. An ISP, router or DNS resolver can slow down or block\nmany rapid requests from one machine, both to the old website during a migration\nand to the new site during checks. The network tools therefore pace themselves\n(`pacing.py` for the Python checks, `browser.cjs` between browser page loads):\n\n| Profile | When | Concurrency | Between requests per host |\n| --- | --- | --- | --- |\n| `local` | default | 2 | 300 ms |\n| `cloud` | `CLAUDE_CODE_REMOTE=true`, `CODESPACES`, `GITHUB_ACTIONS` or `CI` is set | 5 | 100 ms |\n\nEach tool prints the profile it uses. Set `TYPEROLL_REQUEST_PROFILE=local|cloud`\nto choose one and `TYPEROLL_REQUEST_CONCURRENCY=N` (1–16) to change concurrency.\n429 and 5xx answers and network errors are retried up to three times with\nbackoff, honouring `Retry-After`; a host that asks for more than a minute is\nreported, not hammered. On your own computer, keep the local profile and check\na few pages first. Run large crawls, media copies and full-site checks in a\ncloud session (Claude Code on the web, Codespaces, CI). Do the same for your\nown crawling or copying of the old site.\n\n## Before publication\n\n```sh\npython3 scripts/typeroll/check_unsaved.py\n```\n\nExit 1 lists unsaved Pages **and partials**. Review those changes; save only the\nwork authorized for this publication, then run again. Templates save immediately.\nA working-copy preview is not proof of saved output. Never auto-save other work.\n\nThen run `trigger_deploy` with `dry_run: true` and read `get_publication_impact`.\nA publication ships everything saved on the Site, including changes by other\npeople and other agent sessions. If the list has changes you did not make, stop\nand find out whose they are before publishing.\n\n## After an authorized publication\n\n```sh\npython3 scripts/typeroll/check_url_parity.py https://YOUR-TEST-HOST\npython3 scripts/typeroll/check_assets.py https://YOUR-TEST-HOST\nnode scripts/typeroll/shoot_hosted.cjs https://YOUR-TEST-HOST qa/reports/hosted /,/about/ 390 768 1023 1024 1280\nnode scripts/typeroll/card-stacking-check.cjs https://YOUR-TEST-HOST/listing/ 390\n```\n\nURL parity reads every migration inventory page and observed spelling, skips\nexplicit exclusions unless --show-excluded, keeps origins/query parameters,\ndetects loops and flags chains beyond a single redirect (one initial slash\nnormalization is allowed). This does **not** prove the final destination is the\neditorially correct page: compare with the approved URL map too. No inventory\nis a failure, not a passing zero-row check. Asset QA uses resolved routes,\nchecks published/unlisted Pages, relative URLs, srcset and downloads, sends HEAD\nrequests at the request profile's concurrency and falls back to GET when HEAD is unsupported. CSS\nbackgrounds, authenticated assets and dynamically loaded resources need browser QA.\nNeither tool spoofs a search crawler. A 403/DNS/network failure is unverified;\ninspect access policy rather than treating it as a broken migration or a pass.\n\n## Other helpers\n\n- `call.py TOOL '{\"argument\":\"value\"}'`: raw MCP result; use `-` to read JSON\n from stdin. Mutating tools require the same owner authorization as interactive\n calls. Network failures are not automatically retried for mutations.\n- `trlib.upload(path, content_type, alt)`: direct signed upload and mandatory\n finalize SHA-256 verification. No image bytes pass through the model or Git.\n- `sweep_blocks.example.py`: dry-run grid normalization across Pages, templates\n and partials. Review before --apply; refuses to commit existing unsaved work.\n It is not transactional: a failure can leave a partial draft; inspect before retry.\n- `shootframe.cjs OUT-PREFIX SIGNED-PREVIEW-URL [widths...]`: selects only the\n Typeroll preview iframe, reports fonts/hosts/overflow. Signed URLs are secrets;\n pass privately, never paste into committed reports or shell history. For your\n own changes, mint the link with `include_working_copy: true` and the changed\n Page (`page_id` or `slug`), and pass its `frame_url`. Direct-frame capture\n checks rendering only; test Extension storage/navigation/handoffs in the\n original wrapper because those features depend on its parent bridge.\n- `layout_trace.cjs URL [width] [selector]`: computed spacing of ancestors and\n next section. Works with a direct page or Typeroll preview.\n- `contact_sheet.py OUT-PREFIX COLS TILE-WIDTH PNG...`: Pillow contact sheets.\n It crops tall screenshots; inspect full screenshots too.\n- `capture_text.cjs URL qa/reports/text.json 'main .article-content'` followed by\n `compare_text.py sources/private/page.html qa/reports/text.json --source-title 'Title'`:\n word/punctuation diff. A saved single WP REST record (.json) is another source\n adapter. Select exactly the preserved region, including its template-owned\n title once. Deliberate shared additions need separate acceptance. Comments,\n scripts and styles are excluded from source text. It never edits content.\n\nBrowser reports exit nonzero for missing images, overflow, unexpected H1 count,\nfailed requests or incomplete scrolling. They keep third-party failures visible.\nNetwork checks retry only bounded reads, paced per host. All reports, screenshots\nand source exports stay under ignored qa/reports/ or sources/private/. Do not\ncommit signed URLs, personal data or customer assets. Adapt scripts deliberately and run tests\nbefore applying broad changes. The workspace updater preserves your edits.\n\n## Palette migration (Core 0.2.106 / MCP 0.45.80+)\n\n`color_tokens.py --plan /tmp/design-token-plan.json` runs the read-only\n`lint_design_tokens` audit and lists unambiguous direct block hex replacements.\nReview the plan and remove deliberate exceptions. `--apply /tmp/design-token-plan.json`\nrequires the same site/palette and a dedicated non-main Version without existing\nworking copies. Pause other editing in that Version during the run: ordinary\nfield writes do not provide a site-wide transaction. The script refuses stale\nvalues, never retries uncertain writes, and never publishes. On an interruption,\ninspect working copies before saving or resuming. Templates save immediately.\n\nAmbiguous colours, nested/responsive colour maps and custom CSS are reported for\nmanual review rather than rewritten. API updates through the normal block tools\ncan resolve these after choosing the semantic role. Run lint again and compare\nheader, footer, navigation, cards and buttons at all breakpoints. Keep generated\nplans outside Git; they are version-specific review artifacts.\n\n## Local image preparation\n\n`prepare_image.py SOURCE OUTPUT.jpg` requires Pillow with ImageCms. It converts\nthrough the original ICC profile to sRGB and applies orientation, without\nuploading or changing CMS content. Missing CMYK profiles, transparency, multiple\nframes and existing output files stop with an error. `--assume-srgb` is only for\nreviewed unprofiled RGB/gray; `--source-profile FILE.icc` supplies the actual profile.\nSee workflows/source-media.md for archive verification and original preservation.\n\n## Internal Page notes\n\n`page_notes.py --dry-run` previews local note creation/fact refresh and index updates.\nOmit --dry-run to write local files; --migration-inventory adds recorded redirect\nsources. It never writes to the CMS, marks a Page reviewed or deletes notes. Read\npages/README.md and workflows/page-notes.md before first use.\n\n### Heading rhythm after a rebuild\n\n`node scripts/typeroll/check_heading_spacing.cjs https://example.com [paths.json]`\nchecks opening component headings and card spacing at 375, 768 and 1280px.\n`paths.json` is an array of same-origin page paths; otherwise it reads a flat\nsitemap. Requires Playwright and its Chromium browser. Findings need visual\nreview: deliberate asymmetric cards belong in decisions.md. It is a read-only\nQA helper, not a publication gate or a CSS repair tool.\n\n### Sharing metadata\n\nCompare saved full source and deployed target HTML with\n`python3 scripts/typeroll/compare_seo.py qa/source.html qa/target.html`.\nThe report includes document metadata, `og:image`, `og:title`,\n`og:description` and Twitter tags, including missing and duplicate tags.\nRecord intentional differences; an image URL changed by migration needs review\nagainst the media mapping, not automatic approval. This script does not fetch\npages or change content. Keep source snapshots free of private data.\n\nFrom Core 0.2.120 / MCP 0.45.90, preserve distinct sharing text in Page\n`og_title` and `og_description`. Empty fields use SEO metadata. The public\ncontent-type field mapped to Schema.org `image` supplies the image after\n`og_image`, before site defaults. Its `<field>_alt` supplies the image description\nwhen public; `seo_image_alt` is the explicit override. Never copy a site logo\ninto every Page merely to reproduce an old fallback.\n",
37
37
  "scripts/typeroll/browser.cjs": "// Isolated QA browser only. Never persist storage state, cookies or signed URLs.\nconst fs = require('node:fs/promises');\nconst path = require('node:path');\n// Polite pacing: home connections (ISP, router, DNS) can throttle many rapid\n// requests, so the local profile is slow. Cloud runners may go faster.\n// Override with TYPEROLL_REQUEST_PROFILE=local|cloud and TYPEROLL_REQUEST_CONCURRENCY=N.\nconst PROFILES = { local: { concurrency: 2, interval: 300 }, cloud: { concurrency: 5, interval: 100 } };\nconst CLOUD_MARKERS = ['CLAUDE_CODE_REMOTE', 'CODESPACES', 'GITHUB_ACTIONS', 'CI'];\nconst RETRY_STATUSES = new Set([429, 500, 502, 503, 504]);\nconst MAX_RETRIES = 3, MAX_DELAY = 60000;\nconst isSet = value => !['', '0', 'false', 'no', 'off'].includes(String(value ?? '').trim().toLowerCase());\nfunction selectProfile(env = process.env) {\n const explicit = String(env.TYPEROLL_REQUEST_PROFILE ?? '').trim().toLowerCase();\n if (explicit && !PROFILES[explicit]) throw Error('TYPEROLL_REQUEST_PROFILE must be local or cloud');\n const marker = CLOUD_MARKERS.find(name => isSet(env[name]));\n const name = explicit || (marker ? 'cloud' : 'local');\n const profile = { ...PROFILES[name], name, reason: explicit ? 'TYPEROLL_REQUEST_PROFILE' : marker || 'default' };\n const raw = String(env.TYPEROLL_REQUEST_CONCURRENCY ?? '').trim();\n if (raw) {\n if (!/^\\d+$/.test(raw) || +raw < 1 || +raw > 16) throw Error('TYPEROLL_REQUEST_CONCURRENCY must be a whole number from 1 to 16');\n profile.concurrency = +raw;\n }\n return profile;\n}\nfunction describeProfile(p) {\n const hint = p.name === 'local' ? 'on a cloud runner set TYPEROLL_REQUEST_PROFILE=cloud' : 'set TYPEROLL_REQUEST_PROFILE=local on your own computer';\n return `Request profile: ${p.name} (${p.reason}; ${p.concurrency} concurrent, ${p.interval} ms between requests per host). To change it, ${hint}; TYPEROLL_REQUEST_CONCURRENCY=N sets concurrency.`;\n}\n// Milliseconds requested by a Retry-After header (delta seconds or HTTP date), or null.\nfunction retryAfter(value, now = Date.now()) {\n if (value == null) return null;\n const text = String(value).trim();\n if (/^\\d+$/.test(text)) return +text * 1000;\n if (!/[a-z]/i.test(text)) return null;\n const when = Date.parse(text);\n return Number.isNaN(when) ? null : Math.max(0, when - now);\n}\n// Delay before retry attempt+1, or null to stop. status null/undefined means a network error.\nfunction retryDelay(attempt, status, header, now) {\n if (attempt >= MAX_RETRIES || (status != null && !RETRY_STATUSES.has(status))) return null;\n const hinted = retryAfter(header, now);\n const delay = hinted ?? 1000 * 2 ** attempt;\n return delay > MAX_DELAY ? null : delay;\n}\nlet active = null;\nconst nextStart = new Map();\nfunction requestProfile() {\n if (!active) { active = selectProfile(); console.error(describeProfile(active)); }\n return active;\n}\nconst sleep = ms => new Promise(resolve => setTimeout(resolve, ms));\nasync function pace(url) {\n const host = new URL(url).hostname, now = Date.now();\n const start = Math.max(now, nextStart.get(host) ?? now);\n nextStart.set(host, start + requestProfile().interval);\n if (start > now) await sleep(start - now);\n}\n// Paced navigation; a network error, 429 or 5xx is retried a bounded number of times with backoff.\nasync function navigate(page, url, options = {}) {\n for (let attempt = 0; ; attempt++) {\n await pace(url);\n let response, delay;\n try {\n response = await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 60000, ...options });\n } catch (error) {\n delay = error.name === 'TimeoutError' ? null : retryDelay(attempt);\n if (delay == null) throw error;\n }\n if (response !== undefined) {\n const status = response?.status();\n delay = status != null && RETRY_STATUSES.has(status) ? retryDelay(attempt, status, response.headers()['retry-after']) : null;\n if (delay == null) return response;\n }\n await sleep(delay);\n }\n}\nasync function open(page, url) {\n await navigate(page, url);\n // Select only Typeroll's own preview, never an arbitrary ad/video iframe.\n const frame = page.locator('iframe[title=\"Preview\"], iframe[title=\"Site preview\"]');\n if (await frame.count() === 1) {\n await page.waitForFunction(() => document.querySelector('iframe[title=\"Preview\"], iframe[title=\"Site preview\"]')?.getAttribute('src'), null, { timeout: 15000 });\n const src = await frame.getAttribute('src');\n if (!src) throw Error('Preview frame has no source');\n const target = new URL(src, page.url());\n if (target.origin !== new URL(page.url()).origin) throw Error('Unexpected preview frame origin');\n await navigate(page, target.href);\n }\n await page.evaluate(() => document.fonts.ready);\n}\nasync function settle(page) {\n // Bounded for infinite-scroll pages; report coverage rather than hanging.\n for (let y = 0; y < 30000; y += 600) {\n await page.evaluate(y => scrollTo(0, y), y);\n await page.waitForTimeout(100);\n if (y + 900 >= await page.evaluate(() => document.documentElement.scrollHeight)) break;\n }\n await page.evaluate(() => scrollTo(0, 0));\n await page.waitForTimeout(300);\n}\nasync function inspect(page) {\n return page.evaluate(() => ({\n overflow: document.documentElement.scrollWidth > innerWidth,\n h1: document.querySelectorAll('h1').length,\n title: document.title,\n robots: document.querySelector('meta[name=\"robots\"]')?.content ?? null,\n fonts: { body: getComputedStyle(document.body).fontFamily, heading: getComputedStyle(document.querySelector('h1') || document.body).fontFamily },\n incompleteImages: [...document.images].filter(i => !i.complete || !i.naturalWidth).map(i => new URL(i.currentSrc || i.src, location.href).pathname),\n scrollCoverageComplete: document.documentElement.scrollHeight <= 30000,\n }));\n}\nasync function screenshot(page, file) {\n await fs.mkdir(path.dirname(file), { recursive: true });\n await page.screenshot({ path: file, fullPage: true, animations: 'disabled' });\n}\nfunction widths(args) {\n const values = (args.length ? args : ['390', '768', '1023', '1024', '1280']).map(Number);\n if (values.some(w => !Number.isInteger(w) || w < 240 || w > 4000)) throw Error('Invalid viewport width');\n return values;\n}\nfunction fail() { console.error('QA failed; inspect the target privately. URLs and credentials are withheld.'); process.exitCode = 2; }\nmodule.exports = {\n // Loaded on use, so the pacing helpers also work (and test) without Playwright.\n get chromium() { return require('playwright').chromium; },\n open, navigate, settle, inspect, screenshot, widths, fail,\n selectProfile, describeProfile, requestProfile, retryAfter, retryDelay,\n};\n",
@@ -35,7 +35,7 @@ export const deployTools = [
35
35
  },
36
36
  {
37
37
  name: 'retry_deploy_verification',
38
- description: 'Retry only public verification of an already-served customer publication that failed with publication_observation_timeout or publication_cache_refresh_required/external/failed. Reuses the exact job, Git commit and build artifact; never builds, uploads or changes DNS. Requires completed build/candidate receipts, unchanged hosting and no newer deployment for this version. Does not publish later CMS edits. Each failed check may get a bounded refresh of only that path on the site\'s own address; zone-wide refreshes are never made. A removed content-addressed file that Cloudflare still serves with exactly the bytes its name hashes, while a fresh cache key returns 404, is accepted and reported in warnings/retained_immutable. A publication_cache_refresh_failed names the stale layer in cache_recovery.layer (upstream_cache, origin or unknown).',
38
+ description: 'Retry only public verification of an already-served customer publication that failed with publication_observation_timeout or publication_cache_refresh_required/external/failed. Reuses the exact job, Git commit and build artifact; never rebuilds pages, uploads or changes DNS. Also recovers verification runner start/queue failures after a completed artifact build when the exact deployment is still served. Missing candidate verification may run on the build engine; pages are never rebuilt. Requires unchanged hosting and no newer deployment for this version. job.serving records observed public identity separately from check status. Does not publish later CMS edits. Each failed check may get a bounded refresh of only that path on the site\'s own address; zone-wide refreshes are never made. A removed content-addressed file that Cloudflare still serves with exactly the bytes its name hashes, while a fresh cache key returns 404, is accepted and reported in warnings/retained_immutable. A publication_cache_refresh_failed names the stale layer in cache_recovery.layer (upstream_cache, origin or unknown).',
39
39
  inputSchema: { job_id: z.string(), approve_cache_zone_id: z.string().min(1).optional().describe('Retired. Zone-wide cache refreshes are no longer offered and are refused with publication_cache_zone_refresh_retired; retry without it.'), version: versionParam },
40
40
  handler: withErrorBoundary(async (args, { client, siteId }) => ok(await client.post(siteId, 'deploy', { retry_verification_job_id: args.job_id, ...(args.approve_cache_zone_id !== undefined ? { approve_cache_zone_id: args.approve_cache_zone_id } : {}) }, v(args.version)))),
41
41
  },
@@ -134,6 +134,7 @@ export const pageTools = [
134
134
  breadcrumb_label: z.string().max(200).nullable().optional().describe('Optional short breadcrumb label. Leaves Page title, SEO title and route unchanged; null/empty uses the title.'),
135
135
  excerpt: z.string().max(1000).nullable().optional().describe('Plain-text summary (up to 1000 characters) shown by template/page_excerpt ({{page.excerpt}}) and Page cards in listings. Every content type has it; when the type defines its own excerpt field the value is stored there. Saved like other content (draft until saved); null clears it.'),
136
136
  seo_title: z.string().optional(),
137
+ footer_spacing: z.enum(['auto', 'none']).optional().describe('auto uses site footer spacing unless the final block sets its own. none deliberately meets the footer edge to edge; keeps block padding and suppresses the zero-spacing warning.'),
137
138
  append_seo_suffix: z.boolean().optional().describe('Set false to omit the site default SEO suffix on this page.'),
138
139
  seo_description: z.string().optional(),
139
140
  og_title: z.string().optional(),
@@ -183,6 +184,7 @@ export const pageTools = [
183
184
  breadcrumb_label: z.string().max(200).nullable().optional().describe('Optional short breadcrumb label. Leaves Page title, SEO title and route unchanged; null/empty uses the title.'),
184
185
  excerpt: z.string().max(1000).nullable().optional().describe('Plain-text summary (up to 1000 characters) shown by template/page_excerpt and Page cards. Lands in the draft like other content; null clears it.'),
185
186
  seo_title: z.string().optional(),
187
+ footer_spacing: z.enum(['auto', 'none']).optional().describe('auto uses site footer spacing unless the final block sets its own. none deliberately meets the footer edge to edge; keeps block padding and suppresses the zero-spacing warning.'),
186
188
  append_seo_suffix: z.boolean().optional().describe('Set false to use seo_title/page title verbatim without the site suffix.'),
187
189
  seo_description: z.string().optional(),
188
190
  og_title: z.string().optional().describe("Sharing title for OpenGraph/Twitter. Empty uses the SEO title."),
@@ -297,6 +299,7 @@ export const pageTools = [
297
299
  html_content: srcMode === 'html' ? src.html_content : '',
298
300
  blocks: srcMode === 'blocks' ? (src.blocks ?? []) : undefined,
299
301
  seo_title: src.seo_title,
302
+ footer_spacing: src.footer_spacing,
300
303
  append_seo_suffix: src.append_seo_suffix,
301
304
  seo_description: src.seo_description,
302
305
  og_title: src.og_title,
@@ -70,6 +70,7 @@ export const settingsTools = [
70
70
  time_zone: z.string().max(64).nullable().optional().describe('IANA time zone that decides which day and hour it is at the business, for "today", "open now" and dated snippets; times typed into opening hours are never converted. Every site has one: new sites get the usual zone for their language (sv → Europe/Stockholm, nb → Europe/Oslo, da → Europe/Copenhagen, fi → Europe/Helsinki, en-GB → Europe/London; otherwise Europe/Stockholm). Set it when the business is elsewhere. null resets it to the zone of its language.'),
71
71
  date_format: z.string().max(40).nullable().optional().describe('How page and card dates read (render version 14), in the page language: `medium` (default, "12 okt. 2026"), `long` ("12 oktober 2026"), `numeric` (the language\'s numeric order) or `iso` ("2026-10-12"); or a pattern of YYYY, MMMM, MMM, MM, M, DD and D such as "D MMMM YYYY". A Page date block with its own format keeps it. null restores the default.'),
72
72
  motion: z.enum(['full', 'reduced']).nullable().optional().describe('Motion for every visitor (render version 14). `full` (default) plays what each block asks for: entrance animations, carousel autoplay, background videos, moving logo rows and scroll films. `reduced` turns all of them off for everyone; blocks show their still image or content. Visitors whose device asks for reduced motion always get the reduced version. null resets to full.'),
73
+ footer_spacing: z.union([z.enum(['none', 'xs', 'sm', 'md', 'lg', 'xl']), z.number().min(0).max(320), z.object(Object.fromEntries(['mobile', 'tablet', 'laptop', 'desktop', 'wide'].map(bp => [bp, z.union([z.enum(['none', 'xs', 'sm', 'md', 'lg', 'xl']), z.number().min(0).max(320)]).optional()]))).strict().refine(value => Object.keys(value).length > 0, 'Supply at least one breakpoint')]).nullable().optional().describe('Opt-in shared space before the footer: a space token, px, or breakpoint map. Explicit last-block spacing (including 0) wins. null keeps historical block-owned spacing. Page.footer_spacing=none deliberately removes the shared gap.'),
73
74
  content_widths: z.object({ narrow: z.number().int().min(480).max(1200).optional(), normal: z.number().int().min(720).max(1600).optional(), wide: z.number().int().min(960).max(2400).optional() }).strict().nullable().optional().describe('The shared content widths in px (render version 14): defaults narrow 672, normal 1040, wide 1280. Sections, containers, heroes, feature rows and calls to action use them, so blocks of the same width line up. Keep narrow ≤ normal ≤ wide; null restores the defaults.'),
74
75
  sitewide_noindex: z.boolean().optional().describe('Exclude public pages from search indexing; following links remains a separate setting.'),
75
76
  external_routes: z.array(z.object({ path: z.string().min(2).max(2048), owner: z.string().min(1).max(200) }).strict()).max(1000).optional().describe('Exact same-origin paths owned by an independent deployment, e.g. [{path:"/docs/",owner:"Documentation"}]. No wildcards. Does not configure hosting or verify remote availability. Verify each declared public URL separately. Local routes cannot be exempted.'),
package/dist/version.js CHANGED
@@ -8,4 +8,4 @@
8
8
  //
9
9
  // Keep it in lockstep with package.json: tests/version.test.ts asserts
10
10
  // VERSION === package.json.version, so a bump that forgets this line fails CI.
11
- export const VERSION = '0.45.144';
11
+ export const VERSION = '0.45.146';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@typeroll/mcp-server",
3
3
  "mcpName": "io.github.Typeroll/typeroll",
4
- "version": "0.45.144",
4
+ "version": "0.45.146",
5
5
  "description": "Typeroll CMS MCP server \u2013 connect AI agents to the REST API to manage content and publish static websites.",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -151,3 +151,15 @@ Compare 375, 768 and 1280px in Site settings → Design and in a full site previ
151
151
  After a rendering upgrade/rebuild, recheck cards, boxed headings, leading text
152
152
  and webfonts. Boxes should get their outer air from padding. Keep exceptions
153
153
  in decisions.md, and run lint_design_tokens before launch.
154
+
155
+
156
+ ## Shared page endings
157
+
158
+ From Core 0.3.40 / MCP 0.45.145, prefer site `footer_spacing`, for example
159
+ `{"mobile":"lg","laptop":"xl"}`, over copying bottom padding into every Page.
160
+ Inspect the final block and Page template first: explicit bottom/vertical
161
+ padding, spacing-after and selected style spacing win, including zero. Remove
162
+ that override when the page should inherit. For an intentional full-bleed
163
+ ending, set the Page's `footer_spacing` to `none` and record the decision.
164
+ Check `layout_warnings` after Save; `footer_spacing_zero` identifies an explicit
165
+ zero next to text/form content. Verify mobile and desktop before publishing.
@@ -24,6 +24,9 @@
24
24
  Use card-stacking-check.cjs for whole-card excerpt/media/whitespace targets.
25
25
  - Check actual contrast on light/dark/photo backgrounds, image subjects and
26
26
  sharpness, footer balance, left-aligned last rows and heading hierarchy.
27
+ - Check the gap before the footer on text, article and form pages at mobile and
28
+ desktop widths. Prefer shared `footer_spacing` (Core 0.3.40+) and review
29
+ `footer_spacing_zero` save warnings; record intentional edge-to-edge endings.
27
30
  - Check home title/suffix, metadata, canonical/indexing policy and JSON-LD.
28
31
  - Run check_url_parity.py and check_assets.py on the deployed candidate; compare
29
32
  final targets with the approved URL map and flatten accidental redirect chains.