The marketing CMS where agents draft and people publish
Menu

Migration: specification

Status: proposed 2026-11-18; decisions recorded 2026-11-18 (Kevin), with the remaining ones set to defaults he can change (Decisions). Phases 0 and 1 are built (in the importer), phase 2 (the migration job), phase 3 (review, the visual comparison, AI help, the design direction and the AI allowance), phase 4 (gaps that need modules: registry installs from the plan and generated modules) and phase 5 (cutover: delta sync, the redirect check, DNS help, Go live and Roll back) are built (importer.md, Migrate a site), with the choices the text left open recorded in Decisions (phases 4 and 5); Migrate a site on spillwaycms.com is the hosting platform's and is not part of this repository. This document designs Migrate a site: bringing an existing website into Spillway as a guided, resumable job that a person without technical skills can run, pause and finish, and that an agent can run for them. It builds on the domain importer, which already crawls, classifies, converts, extracts a theme and lands drafts; the test of the importer on three real sites (WordPress, Drupal, a static marketing site) is what the design starts from.

The idea

Kevin's brief: migrating a site into Spillway should be seamless and incredible, but simple for the person doing it.

Moving a site today is a project. Someone inventories the old site in a spreadsheet, rebuilds the content model, writes a migration script, copies the menus by hand, recreates the forms, chases the images, maps the URLs, sets up redirects, rebuilds the theme, fixes what broke, then switches DNS on a Friday evening and hopes. Agencies charge for it as a project because it is one.

Spillway can make it a job instead: something you start, watch, answer a few questions for, and finish. The person gives an address (or WordPress or Drupal credentials, or an export file). Spillway reads the whole site, says what it found and what it will do with each part, asks only what it cannot decide, builds the new site as drafts inside a release, shows each page next to the original with what changed, lets the person fix what is wrong in place, then publishes and helps switch the domain over, with a way back.

Three ideas carry the design:

  1. A migration is a plan, then a run. Analysis produces a plan the person can read in five minutes: types, fields, vocabularies, menus, forms, redirects, the theme, and every gap with what Spillway proposes. The run carries out the plan in stages, each of which can be paused, rerun or restarted, in whole or for one type or one section.
  2. The source is the source of truth until cutover. Every entity, term, menu item, form and media item keeps the id it had on the source. A rerun updates what it created instead of adding to it, and a delta sync before cutover brings over what changed on the old site since.
  3. Defaults first, questions only when needed. Every decision has a default that is right for most sites. The plan shows the defaults; the person changes what they care about. The run stops to ask only when it cannot go on safely (a type it cannot place, a gap with no good answer, a budget reached).

What exists

The domain importer (importer.md) already does most of the mechanical work, and does it safely: robots.txt, a rate limit, a page cap, a clear user agent, the SSRF guard on every request, sanitized HTML, drafts only, a release per import. In order: crawl (sitemap, links, redirects, assets cataloged), extract (main region, metadata, images, forms), adapters (WordPress REST and Drupal JSON:API read types, taxonomies, authors, menus, redirects when anonymous requests may), cluster (URL pattern and DOM skeleton), propose types (heuristics, refined by one AI call), convert (fields from source rules; bodies into core blocks; repeated fragments into shared blocks), extract the theme into the brand draft, land (types, media, entities, redirects, menus, shared blocks) with a quality score per page and a report. A five-step wizard under Structure → Import, spillway import <url>, and MCP tools for every step.

The test found it fast and safe, with good body conversion on article-like pages. What separates it from a migration:

  • The site around the content is lost: header, navigation and footer are stripped and dropped; menus come only from the adapters, which anonymous WordPress requests never get; forms become empty placeholders.
  • The structure is guessed, not read: the adapters know the source's types, fields, vocabularies and translations, and the proposals ignore them. The result is near-duplicate types (pages, pages_2, pages_3), archive pages as content, structured fields flattened into the body, no taxonomies, one type per language.
  • The person decides everything, without guidance: one long page of cluster cards, every field editable, no sense of which decisions matter; the quality score reads 95 when the header, navigation and theme are wrong.
  • It is not resumable past the crawl: classification, conversion and landing run inside an HTTP request; a crash during landing leaves the job stuck; a cancelled crawl cannot continue, only start over.
  • One bug blocks most sites: redirects to a trailing slash loop, so a default WordPress site imports only its home page.

Goals and non-goals

Goals:

  1. A person who runs a website but has never migrated one can move a WordPress, Drupal or static site of up to a few thousand pages into Spillway in an afternoon, without help, and the result looks and works like the original.
  2. The person always knows where the migration is, what it is doing, what it needs from them, and what it will cost in AI usage.
  3. Every stage can be paused, continued, rerun or restarted, in whole or for one type, one section or one page, and a rerun never duplicates.
  4. Structure is carried over, not guessed, when the source can tell us: types, fields, vocabularies, menus, translations, authors, redirects, SEO metadata.
  5. Gaps are named before anything runs, each with a proposal: a registry module, a core setting, a generated module (sandboxed and reviewed), or an embed.
  6. Cutover is a guided step with a delta sync, redirects verified, DNS help and a rollback.
  7. An agent can run the whole migration for someone over MCP, stopping for the same decisions a person would make.

Not in the first version: user accounts and passwords (authors are kept as bylines, and an admin can invite any of them later), e-commerce orders and customers, comment threads as live comments (dropped by default, or kept as static text under each post), membership and paywall rules beyond Spillway's members-only content, sources other than WordPress, Drupal and plain HTML sites (Squarespace, Wix, Webflow, Joomla, HubSpot come later through the crawl path and their export formats), and two-way sync after cutover.

Terms

The admin uses these words, and the docs follow.

  • Migration: one job that moves one source site into one Spillway site. It has a plan, stages, items, a log and a release.
  • Source: the site being moved, reached through a connection: its address (the crawl), WordPress or Drupal credentials (the API), or an export file (a WordPress WXR file, a Spillway export, a static site archive).
  • Inventory: what analysis found on the source, counted and described.
  • Plan: what the migration will do with each part of the inventory, with the defaults filled in and every decision the person may change. The plan is versioned; the run follows the version that was approved.
  • Decision: one choice in the plan (map this to an existing type, keep this URL, use this module). A decision is open when the plan cannot proceed without the person, defaulted otherwise.
  • Gap: something on the source that Spillway has no direct equivalent for, with the proposal for it.
  • Stage: one part of the run (media, types, content, menus, forms, redirects, theme, checks). Stages have a status and checkpoints.
  • Item: one unit of work in a stage, with its own status: a page, a media file, a term, a menu, a form, a redirect.
  • Source id: the identity an item had on the source (wordpress:post:42, drupal:node:7:es, crawl:/about). Stored on everything a migration creates.
  • Delta sync: a later run that brings over only what changed on the source since the last one.
  • Cutover: switching the domain to Spillway, with the redirects and a rollback.
  • Byline: an author's name kept on migrated content, without a user account.
  • Migration allowance: the one-time AI allowance a site gets for migrations.
  • Generated module: a sandboxed module the AI writes for one site to fill a gap, installed only after a person reviews it.

The flow for the person

Seven steps, shown as a step strip at the top of the migration screen. Each says what it needs, what it is doing, or that it is done. A person can leave at any point and come back; the migration is where they left it.

 1 Connect  →  2 Analyze  →  3 Plan  →  4 Run  →  5 Review  →  6 Publish  →  7 Cut over

1. Connect

Migrate a site (the dashboard card, Structure → Import and migrate → Migrate a site, the setup wizard on a new site, or Start a site on spillwaycms.com) asks one question: Where is the site you want to move? One field takes any of:

  • An address (www.example.edu). Spillway checks it at once: reachable, the platform it runs on, whether its API answers, robots.txt, the sitemap and its size. It then shows what that means: "This is a WordPress 6.8 site with about 1,240 pages. Its public API is on. Connecting with an application password would also bring over menus, forms and drafts."
  • WordPress credentials: the site address (over https) plus a user name and an application password (WordPress 5.6 and later, no plugin). The screen links to the user's profile page on their site, where the password is created, and says to use a user with the Editor role or above.
  • Drupal credentials: the site address plus a user name and password for HTTP Basic (the basic_auth module) or an OAuth client (Simple OAuth), with JSON:API on. The screen explains how to turn JSON:API on and that read-only is enough.
  • An export file: a WordPress export (WXR, from Tools → Export), a Spillway export (spillway export), or a zip of a static site. Media in a WXR file is fetched from the addresses it names; a static zip carries its own.

Credentials are stored encrypted with the instance key like the AI and mail keys, used only for this migration's requests to that host, shown never again, and deleted when the migration is deleted or cut over (the person may delete them earlier). The connection is read-only by design: no adapter calls a method other than GET (and HEAD), and the migration never writes to the source. Credentials are refused for a source on plain http (the screen says why and asks for the https address); the one exception is an intranet site on a private address on an instance that runs with SPILLWAY_ALLOW_PRIVATE_URLS=1.

Defaults, each changeable under Options: a page cap from the sitemap's size (up to 5,000 crawled pages, or 25,000 items when the connection has credentials and the API does the reading; above that, the plan says so and asks), 500 ms between requests (slower when the source sends Retry-After or Crawl-delay), robots.txt respected (it can be overridden only for a verified domain), land inside a release, AI on when the site has it, an AI budget from the estimate, comments left out.

Continue starts the analysis. Nothing has been fetched beyond robots.txt, the sitemap and the API's index.

2. Analyze

Analysis reads the source without changing anything on Spillway: the API first (types, fields, terms, menus, users, media, forms, redirects, SEO plugin data), then a crawl of the public pages for what the API cannot see (the rendered chrome, the theme, embeds, scripts, pages built by plugins), then the classification of what the crawl found against what the API said. It produces the inventory and a first plan.

What the person sees: a progress view with one row per part (Pages, Types, Vocabularies, Media, Menus, Forms, Users, Redirects, SEO, Embeds and scripts, Plugins or modules), each filling in as it is counted ("Pages: 812 found, 640 read"), a short plain-language log ("Read 14 menus", "Found a Gravity Forms form on 3 pages"), the AI used so far against the budget, and Pause. For a site of a thousand pages, analysis takes minutes, bounded by the rate limit.

Analysis is the expensive read; the run reuses everything it fetched (raw HTML, API responses, CSS) from the migration's store, so the source is read once.

3. Review the plan

The plan is one screen the person can read in five minutes, in sections, each with a one-line summary and a status: Ready, Check (a defaulted decision worth a look) or Needs you (an open decision). The run cannot start while anything says Needs you.

  • Content types: "7 types: Pages, Posts, Programs (new, 9 fields), Events (new, 6 fields), People (maps to your People type), Departments and Campuses (vocabularies)." Each type opens to its fields, where each came from, a sample page, and the confidence of each mapping.
  • Vocabularies: categories, tags, departments, with term counts.
  • Media: count, size, what is skipped (over the size cap, a type not allowed).
  • Navigation and regions: the header, the navigation menus, the footer, how they will be built (menus, shared blocks, placements), with a picture of each.
  • Forms: each form, the fields it has, what it will become (a Spillway form, an embed), and where submissions go.
  • URLs and redirects: how many URLs are kept, how many change (with the rule), how many redirects come from the source, and the ones that point off-site.
  • SEO: titles, descriptions, canonical URLs, social images, structured data, noindex pages.
  • Theme and brand: the palette, fonts, logo and favicon, with the contrast check.
  • Gaps: each feature Spillway lacks, with the proposal and the alternatives.
  • Authors: kept as bylines (the author's name on each item, in a Byline field). No user account is created and nobody is emailed. Each author has Invite for an admin who later wants that person to have an account (see Authors).
  • Comments: dropped by default. Keep comments as text keeps them as static text under each post.
  • Not migrated: what will be left behind and why (comments unless kept, e-commerce, pages excluded by robots.txt or by the person).
  • Estimate: the time the run will take at the chosen rate, the storage, and the AI: tokens and cost for each step, and what pays for them (see AI cost).

Every section has Change for the person who wants to, and nothing else is required. Approve the plan shows the AI estimate step by step and asks the person to confirm it; confirming starts the run.

4. Run

The run carries out the plan in stages: media, vocabularies and types, content (in batches), regions and menus, forms, redirects, theme, then checks. The person sees the step strip, a progress bar per stage, counts per item status, the current item, the time left, the AI used, a live log in plain words, and Pause. They can close the tab: the run continues on the server and sends an email (and a notification in the bell) when it finishes, fails or needs them.

The run only stops to ask when it cannot go on safely. Examples: a page whose type the plan did not cover (a new kind of page appeared on the source since analysis), the AI budget reached, the source refusing requests (a 403 wall, a rate limit that will not lift), a gap the plan deferred. When the AI budget runs out, the run stops cleanly: the items in progress finish, nothing is left half written, and the migration is Paused: AI budget used up with the ways to continue (AI cost). Everything else that goes wrong is an item failure, recorded with the reason, retried, and listed for review; it never fails the migration.

5. Review and fix

When the run finishes, the migration opens on Review: every migrated page with its status and quality, filters (by type, by section, below a score, with a given issue, not yet reviewed), and for each page the original and the new one side by side, a visual difference, the issues and Fix:

  • Fix this page opens the page builder on the draft.
  • Fix every page like this (for a problem in the conversion of a whole type: a field mapped wrongly, a block that should be another) changes the plan for that type and reruns the content stage for it, keeping the hand edits the person made (see Hand edits).
  • Ask AI to fix proposes a fix to the page or the type's mapping, shown as a change to approve.
  • Mark as reviewed and Skip this page (it will not be published).

A summary at the top says what is left: "812 pages: 790 good, 18 to check, 4 failed. The header and footer are ready. 2 forms need a destination for submissions."

6. Publish

Publishing merges the migration's release. Before it, Publish runs the release's checks and shows what is not ready: pages not reviewed (allowed, with a warning), failed pages (left out), forms with no destination, the home page, the brand draft. The person can publish all, publish by section (merge the release in parts), or schedule the merge. The brand draft publishes with it.

Publishing does not change the domain: the site is live at its Spillway address (or a preview domain on a hosted site) while the old site still answers at its own. This is the time to share it with colleagues.

7. Cut over

Cutover switches the domain, in four moves the screen walks through:

  1. Delta sync: bring over what changed on the source since the run (new, changed and deleted pages, media, menu changes), as a short run into a new release, reviewed like the first. A content freeze on the old site is recommended and the screen says when the last sync ran.
  2. Redirects: every URL the source had (from the crawl, the sitemap, the API's permalinks and the source's own redirects) is checked against the new site: it answers, or it redirects to a page that answers. The list of the ones that would 404 comes with a proposal for each.
  3. Domain: on a hosted site, adding the domain, the DNS records to set at the registrar (with the registrar recognized and a link to its DNS page), checking them, and the certificate. Self-hosted: the records to set and the BASE_URL to change, then Go live checks.
  4. Watch: after the switch, the first days' 404s (the existing redirects misses list) with one-click redirects, and the search engine checklist (sitemap submitted, Search Console verified).

Roll back is available for 30 days. The source was never changed, so pointing DNS back at it is the rollback: the screen keeps the records as they were before the switch and shows them again, and on a hosted site the Spillway site stays reachable at its own address meanwhile. For content, a backup runs just before the release merges, and Restore under Backups is the way back.

The job's state model

A migration has one status, a list of stages each with a status, and items each with a status. The status is what the list and the step strip show; the stages say where the work is; the items say what happened to each thing.

Migration status

                     ┌──────────── pause ───────────┐
                     ▼                              │
 draft ──connect──▶ analyzing ──▶ planned ──approve──▶ running ──▶ review ──publish──▶ published ──cut over──▶ live
   │                 │   ▲          │  ▲                │  ▲         │  ▲                │                     │
   │                 ▼   │          │  └── replan ──────┘  │         │  └─ rerun part ───┘                     │
   │               paused┘          └──▶ needs_input ──────┘         └──▶ syncing (delta) ──▶ review           │
   │                                                                                                           │
   └──────────────────────── archived (any state; data kept, nothing runs) ◀───────────────────────────────────┘
StatusMeaningThe person can
draftCreated, connection not checked yet.Connect, delete.
analyzingReading the source; the inventory fills in.Pause, cancel.
plannedThe plan is ready. Open decisions may remain.Change the plan, approve it, reanalyze.
needs_inputThe run met something it cannot decide; the stage that met it is paused, other stages go on when they do not depend on it.Answer, then continue.
runningStages are running.Pause, rerun a part, open what is done.
pausedStopped by the person, by a budget, or by the source refusing requests; the reason is shown.Continue, rerun, change the plan, cancel.
reviewThe run is done; pages wait for review.Fix, rerun a part, publish.
syncingA delta sync is running.Pause.
publishedThe release is merged.Delta sync, cut over.
liveThe domain points at Spillway; the migration keeps its records for redirects and rollback.Roll back, archive.
failedSomething the migration as a whole cannot go past (the connection lost for good, the plan invalid after a Spillway update). Rare by design: item failures never cause it.See why, fix, continue.
archivedKept for its records; nothing runs. Credentials are deleted.Delete.

cancelled from today's importer becomes paused with the reason "cancelled": a paused migration can always continue from its checkpoint, or start a stage again.

Stages

StageDepends onItemsCheckpoint
analyze.apiconnectionsource types, terms, menus, users, forms, redirectsper resource and page of results
analyze.crawlconnectionpages, assetsthe crawl queue (today's import_queue)
analyze.classifyanalyze.*clusters, mappingsthe plan version
mediaplanmedia filesper item
structureplantypes, fields, vocabularies, termsper item
contentstructure, media (references resolve later if media is still running)entities (one per source page and language)per item, batches of 50
regionscontentheader, footer, menus, placementsper item
formsstructureforms, form blocksper item
redirectscontentredirectsper item
themeanalyze.crawlbrand draft tokens, logo, favicon, fontsthe whole stage (small)
checksallquality and visual comparison per pageper item

Each stage is pending, running, paused, done, done_with_errors or skipped. A stage records its checkpoint (the last item it finished) and its plan version.

Items

An item is pending, running, done, failed (with the reason and the number of tries), skipped (by the plan or by the person), needs_input, or stale (the plan or the source changed since it was done; a rerun picks it up). Every item has its source id, its target (the entity, media item, term, menu or form it created), a content hash of what it was made from, and the plan version it followed.

Pause, continue, rerun, restart

  • Pause stops after the current items finish (within seconds; no item is left half written, since each item's write is one transaction). Continue resumes from the checkpoints.
  • Rerun a stage, a type, a section (a path prefix such as /news/**), a set of pages, or one page. A rerun marks the matching items pending and runs them again with the current plan; items it creates are matched to what exists by source id, so nothing is duplicated.
  • Restart a stage from scratch: the stage's items go back to pending and what they created is updated in place (or, with Remove what this stage created, deleted first; deleted entities are only ever drafts in the migration's release).
  • Reanalyze reads the source again into a new plan version. The person sees what changed between the versions ("3 new pages under /news, 1 menu changed, 1 new type") and approves; items whose source changed become stale.
  • Replan after a change in Review (a field mapping, a block choice) makes a new plan version for that type; the content stage reruns for it.

All of these are available in the admin, the API and MCP, and are audited.

Hand edits survive reruns

A person fixes a page by hand, then reruns the type. Their fix must not be lost. Each entity the migration created records the revision it wrote last. On a rerun, if the entity's current revision is still the migration's, the rerun updates it; if a person has edited it since, the rerun leaves it alone and marks the item edited by hand: not updated, with Update anyway (which writes a new revision, so the hand edit stays in the history) and Compare. The same holds for shared blocks, menus, forms and the brand draft.

Authors

Authors are kept as bylines: the name the source showed (the WordPress display name, the Drupal user's name, the byline on the page) goes into a Byline field on each item of a type that had authors, and a migration never creates user accounts or sends email for them. The entity's own author in Spillway is the person who ran the migration, as for any import.

The plan's Authors section, and later Structure → Import and migrate → (the migration) → Authors, lists each author with the number of items and, when the connection had credentials, the email the source holds. An admin (users.manage) can Invite any author with one click: Spillway's account invitation goes to that email (or one the admin types), with the role the admin picks (default Author). When the person accepts, their items' author becomes their new account and the byline stays. Agents cannot invite: there is no MCP tool for it, since it emails a person.

Comments

Comments are dropped by default: they are personal data of people who never agreed to move, and most marketing sites do not need them. Keep comments as text keeps each post's approved comments as static text under the post (a Comments heading and a Text block per comment with the commenter's display name, the date and the comment, sanitized), with no email addresses, IP addresses, avatars, replies form or moderation. A delta sync updates them like any other content.

Analysis

Analysis builds the inventory from every source available, in this order of trust: the platform API with credentials, the platform API without, the export file, the crawl, fingerprints. Where two disagree, the API wins for structure (types, fields, terms) and the crawl wins for what visitors see (the chrome, the rendered page, the theme).

What is inventoried

PartWordPressDrupalAny site (crawl)
Pages and content/wp/v2/<type> for every REST-enabled post type, with context=edit when signed in (raw content, drafts, private, scheduled)JSON:API node--* per bundle, every language (/<lang>/jsonapi)sitemap, links
Types and fields/wp/v2/types; registered meta (/wp/v2/<type> schema via OPTIONS); ACF field groups (/acf/v3 or the ACF REST fields); Pods and Meta Box when they expose RESTbundles and field definitions (field_config--field_config, field_storage_config--field_storage_config with credentials); a sample entity's attributes and relationships withoutclusters by URL pattern and skeleton
Taxonomies/wp/v2/taxonomies and terms, with hierarchytaxonomy_vocabulary--*, taxonomy_term--* with parentsbreadcrumbs, tag links, archive URL patterns
Media/wp/v2/media (originals, alt, caption, sizes)media--* and file--file (originals, alt)images, documents, video
Menus/wp/v2/menus, /wp/v2/menu-items (credentials needed: core hides them from anonymous requests); block themes' wp_navigation postsmenu_link_content with credentials; menus made of route and view links only from the crawlthe header and footer navigation, read from the rendered page
Header, footer, regionsblock themes: wp_template_part (header, footer); classic themes: the crawlblock layout is not in JSON:API: the crawlthe <header>, <footer>, nav and landmark regions that repeat across pages
FormsContact Form 7 (/contact-form-7/v1), Gravity Forms (/gf/v2, credentials), WPForms, Ninja Forms (fingerprint, then the rendered form)Webform (webform--webform with credentials), core Contact formsevery <form> with its fields, action, method and the platform it posts to
Users and authors/wp/v2/users (names; emails and roles with credentials)user--user (names; emails and roles with credentials)bylines, author meta, JSON-LD
RedirectsRedirection (/redirection/v1, credentials), Yoast Premium and Rank Math redirects (credentials)the Redirect module (redirect--redirect)redirects met while crawling
SEO metadataYoast (yoast_head_json on every REST item), Rank Math, SEOPress, All in One SEOMetatag (metatag attribute), Pathauto patterns, Simple XML Sitemap<title>, description, canonical, robots, Open Graph, Twitter cards, JSON-LD, hreflang
TranslationsWPML (wpml_translations), Polylang (lang and translations fields)content translation: one entity per language, linked by idhreflang, <html lang>, the language switcher
Embeds and scriptsoEmbed blocks in raw contentMedia remote video, iframe fieldsevery <iframe>, <script src>, inline script by fingerprint (analytics, tag managers, chat, maps, booking, forms, social feeds, ads)
Plugins or modules/wp-json/ namespaces (each plugin with a REST API names itself: yoast/v1, gf/v2, wc/v3); /wp/v2/plugins with credentials (name, version, active); asset paths /wp-content/plugins/<slug>/JSON:API resource types (webform--, paragraph--, group--, commerce_product--, redirect--); drupalSettings keys; asset paths /modules/contrib/<name>/; with credentials, the enabled modules where an endpoint exposes themthe generator meta tag, headers, asset paths, known script hosts

Everything optional stays optional: a 401, 403 or missing resource is logged ("Menus need a signed-in connection; using the navigation seen on the pages instead") and analysis goes on.

Mapping to Spillway

Every part of the inventory gets a target, and every source feature found (a plugin, a module, a script, a field type) is matched against a table Spillway ships and keeps current: source feature → Spillway feature, one of core (built in, maybe a setting to turn on), registry (a module or kit in the registry, with its name), or needs a module (nothing yet). A first version of the table:

SourceSpillwayKind
Posts, pages, custom post types, Drupal bundlescontent typescore
Categories, tags, custom taxonomies, Drupal vocabulariesvocabularies and terms, taxonomy fieldscore
ACF, Pods, Meta Box, Drupal fields: text, number, date, select, true/false, link, image, file, relationship, taxonomy, repeater, group, flexible contentfields: text, textarea, richtext, number, date, daterange, select, boolean, link, media, reference, taxonomy, json; repeaters and flexible content as layout with blocks or jsoncore
Gutenberg blocks, Drupal Paragraphs, Layout Builder sectionsblocks (core, shared, module blocks)core
Reusable blocks (wp_block), template parts, Drupal blocks in regionsshared blocks, placementscore
Menusmenus (Main navigation, Footer, keyed menus)core
Yoast, Rank Math, SEOPress, AIOSEO, Metatagthe SEO fields, redirects, sitemapcore
Redirection, the Redirect moduleredirectscore
Contact Form 7, Gravity Forms, WPForms, Ninja Forms, Webform, Drupal Contactformscore
reCAPTCHA, hCaptcha, Turnstile, Friendly Captchathe form's captcha settingcore
Google Analytics, Tag Manager, Meta Pixel, LinkedIn, Clarity, Hotjar, MatomoAnalytics and the Tracking tags formcore
WPML, Polylang, Drupal content translationlanguages and translationscore
Members-only plugins (basic role-based access), Drupal Content Accessmembers-only content (Who can see this)core
The Events Calendar, Drupal Smart Date and recurring datesan events type with daterange (recurrence), the Calendar blockcore
Akismetthe Akismet moduleregistry
Mailchimp, Constant Contact, Campaign Monitor sign-up formsthe mailing-list moduleregistry
Salesforce Web-to-Lead, Slate, CiviCRMtheir modulesregistry
Google Maps, store locatorsthe maps moduleregistry
YouTube feeds, Google Reviewstheir modulesregistry
Social share buttonsthe share-links moduleregistry
TablePress, data tablesthe data-table moduleregistry
WooCommerce, Drupal Commercenot migrated (shop links kept as links)needs a module
bbPress, forums, BuddyPressnot migratedneeds a module
Sliders and carouselsthe Carousel block (an image slider lands as a Cards carousel of Image slides)core
Accordions and tabsthe Accordion and Tabs blocks (a run of details elements lands as an Accordion)core

The table is data, not code (a JSON file in core, updated with each Spillway release and readable by agents), so it can grow without a release of the migration code. Registry entries name the package; the plan offers to install it (sandboxed modules by a manager or admin; trusted modules only as the trust model allows).

Gaps

Types and fields are created automatically

Types, fields and vocabularies are never a gap: the migration creates what the source needs, in the plan, before anything runs. The rules:

  • One type per source type, not per URL pattern, when the source names its types (WordPress post types, Drupal bundles). Clusters are used only to find types on sites with no API, and to find kinds of pages inside a source type that should be split (a page type that holds both landing pages and staff profiles). Two clusters with the same path pattern never become two types; a type is proposed only when at least two pages share a pattern with a variable part (today's rule) and its fields differ from every other proposal.
  • Existing types first: a source type maps onto a Spillway type when their names or keys match (post → Posts) or at least 60% of the fields match; the plan shows the mapping and the fields that will be added.
  • Archive and listing pages are not content: category, tag, author, date and search archives, paginated listings and feeds are recognized (from the API's permalinks, URL patterns and page shape) and become vocabularies, terms and listings (a Collection block on a page at the same path), not entities of a new type.
  • Translations are translations: pages in other languages become translations of the same entity (drupal:node:7:es), not types of their own; the site's languages are added.
  • Field types map from the source's types (the table above). A source field type with no equivalent becomes json (kept, not shown) or richtext (shown), the person chooses; the plan flags it.
  • Keys follow the source's names, made valid and unique (field_cooking_time → cookingTime), with the source name kept on the field for reruns.

Missing features: the proposal ladder

For a feature Spillway lacks (a plugin, a module, a block type, a script-driven widget), the plan proposes, in this order, the first that fits:

  1. A registry module that does it. The plan names it, says what it costs to run (sandboxed or trusted, the capabilities it asks for) and installs it on approval.
  2. A core setting or a core block that does it (the Tracking tags form for a pixel, the captcha setting for a captcha plugin, members-only content for a basic access plugin, the embed allow-list for a widget host; Use the Carousel block for a slider, Use the Accordion block for accordions and tabs, where the migration lands what it recognizes in the block and the rest shows one after another, ready to move into one in the page builder). A feature a core block covers stays on this rung whatever its page count; a generated module for it (rung 3) is still offered for markup the converter cannot read, but only a person picks it.
  3. A generated module: a small module the AI writes for this site, declarative or with code, always in the module sandbox, reviewed and installed by a person, never trusted (below).
  4. Keep it as an embed or as HTML: an Embed block when the feature is an iframe from a host the person adds to the allow-list, or the content as sanitized HTML in a Text block (what it showed, without its behavior). The plan says what is lost ("The slider will show its first image only").

The person can pick a lower rung than the one proposed, or Leave it out. A feature used on one page is not worth a module; the plan says how many pages use each gap and defaults to the embed or HTML rung below a threshold (five pages).

Generated modules, and how they are kept safe

Decided 2026-11-18 (Kevin): generated modules may contain code, not only declarative blocks. A person reviews every one and clicks to install it, every one runs in the module sandbox, and nothing generated is ever trusted. The rules below do not bend.

Two kinds. The generator picks the simpler one that does the job, because it is less to review:

  • Declarative: a module manifest with one or more blocks (fields, defaults, style slots, as in Blocks in the page builder) and a template for each, in a logic-less template language (placeholders, sections over arrays, conditionals on presence; no expressions, no calls). One fixed renderer that ships with Spillway, compiled to Wasm and reviewed once, renders every declarative module: the AI writes data, not code. This covers most marketing gaps: an accordion, tabs, a pricing table, a recipe card, a staff card, a timeline.
  • Code: source the AI writes in AssemblyScript, compiled to a .wasm sandboxed extension, for what a template cannot do (a filter over a list, a calculator, a feed from a named service, a scene). Generated code is capped at 2,000 lines so a person can read it.

The sandbox and its capabilities. Every generated module is a sandboxed extension ("tier": "sandboxed"), with the sandbox limits enforced by the host: plain Wasm with no WASI (no file system, clock or environment), 100 ms of guest time and 2 s wall clock per call, at most 32 MB of memory, 1 MB payloads in and out, its own worker thread, and every rendered output through the rich text sanitizer. Of the capabilities, a generated module may ask only for:

CapabilityWhat it allowsGranted
blocksBlocks in the page builder, rendered by render_blockwhen asked for
entity.readReading a published entity by id while rendering (a related item's title)when asked for, shown on the review screen
scenesA scene in its sandboxed framewhen asked for
http:<host> or http:setting:<key>Requests to one named host (or the host of one setting), https only, through the outbound guard, 5 s timeout, 1 MB responses, no redirectsonly when the person grants that host on the review screen; off by default

Never: hooks (they see every save and every form submission), fields, admin, mail, accounts.*, site.read, media.read, entity.write, ai.tools, or the trusted tier. The install path refuses a generated package whose manifest names anything else, and refuses "tier": "trusted" even on an instance started with SPILLWAY_TRUSTED_MODULE_INSTALL=1. A generated module cannot be converted into a trusted one; a person who wants that writes and installs a module the ordinary way.

No network unless granted. A generated module has no network by default. When the feature needs a service (a feed, a booking widget's API), the manifest asks for that host and the review screen shows it as a separate, unticked box with the reason ("api.example-feeds.com: to load the latest five items"). Installed without the host, the module runs without it and its block shows its fallback. Granting or withdrawing a host later is a change on the module's page, audited like the install.

Built where it can reach nothing. Code is compiled in an isolated builder: a separate process (a container on hosted sites) with no network, no access to the data directory or the environment, a pinned toolchain, and time and memory limits. The build is reproducible: the same source gives the same .wasm, so the hash shown on the review screen is the hash of what will run. Nothing generated runs before review except the sample renders in the sandbox, with no network and no capabilities beyond blocks.

The review screen. One screen, for a person with site.settings for a declarative module and an admin (users.manage) for a module with code:

  • what it is for, in plain words, the gap it fills and the pages that will use it;
  • each requested capability, with what it allows in plain words, and each host with its box;
  • the manifest, and the template or the full source code with syntax highlighting (the AI's explanation of the code beside it, marked as AI-written and as no substitute for reading it);
  • the checks: the manifest validated with the registry's checks (checkManifest, checkBlock), the build log, the sample renders next to the original pages, and a run with random props within the declared fields that stays inside the limits;
  • for an update, the difference from the installed version.

Install is a separate, explicit click. Approving the plan does not install anything, and neither can an agent or an API call without a person's session: approve_migration_plan and every other MCP tool return needs_input with a link to this screen.

Signing. On install, the instance signs the package with its own Ed25519 key (DATA_DIR/generated-module-key, mode 0600, created on first use and carried by backups): the signature covers the manifest, the hash of the .wasm (or of the template), the hash of the source, the granted capabilities and hosts, the reviewer and the time. The module loader checks the signature before it instantiates any module whose source is generated; a module whose files or grants changed after review does not load and is disabled with Changed since review. Every change (a regenerated version, a new host) goes through the review screen again and gets a new signature. The audit log records module.install_generated with the hashes and the reviewer. The signature proves the module is the one a person on this site reviewed; it makes no claim a registry could check.

Removal. A generated module is listed under Modules with the label Generated for this site and the migration that made it. Disable stops it at once (its blocks render their placeholder); Remove deletes it. Because it can only render blocks, nothing else on the site depends on it: removing it changes no content. On removal the migration offers to replace its blocks with the HTML rung, using the last rendered output of each block, so pages keep what they showed. --safe-mode boots without it like any module.

Never published from a migration. A person may publish a generated module later through spillway publish, where the registry's own checks and review apply like for any package.

Why this is safe. The sandbox cannot reach the database, the file system, the environment, other modules or any host the person did not grant, and the allowed capabilities only render blocks and read published content. A malicious or broken module can at worst render wrong text inside its own block (bounded by the sanitizer) or fail and show its placeholder. A prompt injection on the source site can at worst produce a package that fails the checks or that the reviewer declines: the AI that writes packages has no tool that installs them, and the signature stops a package from changing after its review.

Design direction

How much of the old site's look and layout to keep is one choice the person makes in the plan, by seeing their own pages, not by reading descriptions. It never changes the content: content lands once, as structured fields; the design direction decides the theme, the layouts and how many site-specific pieces are built.

The four stops

Design direction in the plan is a slider with four stops, each shown as a live preview of three of the site's own pages (the home page, a typical inner page and a listing), rendered from the analysis before anything lands:

StopLook (colors, fonts, logo)Layout and componentsGood for
MatchThe old site's, from its stylesheetsMirrors the old structure; site-specific blocks where Spillway has no equivalentA site redesigned recently that should look the same
FamiliarKeptRebuilt from Spillway blocks closest to the old structureSites whose brand matters more than their layouts
RefreshKept, cleaned: contrast fixed, font pairing tidiedSpillway layouts chosen by content typeMost sites; the default when nothing suggests another stop
Fresh startA Spillway theme the person picks; the logo staysBest-practice layouts; content onlyA site whose design should not be carried over

Advanced splits the slider in two, Look and Layout, so a person can keep their exact brand with better pages (Match look, Refresh layout), the most common request. Per page type overrides the layout: "the home page Familiar, everything else Refresh". (As built: the look is the site's brand, one per site, so it has no override per type.)

The suggestion

The analysis suggests a stop and says why, from the site itself: the share of text that fails contrast, how many distinct layouts serve how many types, whether the pages work on a phone, outdated patterns (tables for layout, text in images, carousels as the only navigation), and the quality score. "Text fails contrast on 38% of pages and there are 12 layouts for 9 page types: we suggest Refresh." A site with a clean, accessible design is suggested Match or Familiar; a site that would carry its problems over is nudged toward Fresh start without anyone being told their site is bad. The suggestion is a default, never a lock.

Never worse

At every stop, accessibility only improves: contrast is fixed (the theme roles' contrast check), images keep or gain alt text, headings are put in order, and focus styles exist. Match keeps the look, not the problems; the plan lists what it changed for this reason.

Changing your mind

The direction can change at any time before publishing, from the plan or from Review. Because the content is already structured, a change applies the new theme and layouts to the landed entries without crawling again or touching edited text: hand edits survive, as they do for reruns. Nothing is live until the import's release is published. Compare with the original on any page in Review shows the old page and the new one side by side, with the direction's slider between them.

What gets built for the site

Each stop decides how far up a ladder of site-specific pieces the migration may go. Lower rungs come first; a rung is used only when the one below does not reproduce the source closely enough for the chosen stop:

  1. Theme tokens: palette, fonts (served from the site), spacing, radius and the logo, as the site's brand kit. Every stop.
  2. Block style variants: the existing blocks' options and named styles set to match the source (a card with a border and a shadow, a button shape). Match, Familiar, Refresh.
  3. Site components: a section that repeats on the source with its own content on each page (a staff card grid, a program summary) becomes a site component made of existing blocks, with a field for what differs between pages, so its design stays locked and editors fill it in. Match and Familiar. (Decided in phase 3 instead of patterns: a pattern is copied onto each page, so a later change to it reaches none of them; a component reaches every page that uses it.) The migration makes it as a draft; pages render published components only, so they keep the same blocks inline until someone publishes it in the studio and reruns them.
  4. Scoped site CSS: a stylesheet layer for details the tokens and variants cannot express, scoped to the site's own classes and checked by the same style allowlist as module styles. Match, and Familiar for the home page.
  5. Generated blocks: a source component with no Spillway equivalent, used on at least five pages, becomes a block in a generated module: always sandboxed, reviewed and installed by a person, as for generated modules. Match only by default; at the other stops the nearest Spillway block is used and the plan says what changes.

Every piece built is the site's own (its brand kit, its patterns, its module), shown in the plan with the pages that use it, and editable after the migration like anything made by hand.

AI use

AI makes the migration feel effortless, but nothing depends on it: every AI step has a heuristic fallback, and a site with AI off migrates with more decisions left to the person. AI never publishes and never installs; it drafts plans, mappings and fixes that a person approves. All AI calls run through the site's provider (the import task, its own key or the host's AI), are logged in ai_log, and count against the migration's budget.

UseWhat the AI getsWhat it returnsWhere a person confirms
Clustering into types (sites without an API, and splitting mixed source types)Per cluster: the URL pattern, three sample pages (headings, excerpts, structure summary), the source's own type names when knownNames, descriptions, merge and split suggestionsThe plan (types section). Defaulted when confidence is high.
Field mappingThe source type's fields (names, types, sample values) and the target type's fields; for crawled sites, the repeated elements of the cluster's skeleton with samplesA mapping per field with a confidence (0 to 1) and a reason; proposed new fieldsMappings below 0.7 are marked Check in the plan; below 0.4 the field is left unmapped unless the person maps it.
Block conversion and placementThe page's main region as a structure tree (not raw HTML), the site's block set with their fields (core blocks, module blocks, the site's patterns and shared blocks), and the type's allowed blocksA block tree using only those blocks, with props; a choice of shared block where a fragment repeatsPer type: the person approves the conversion of three sample pages before the type runs. Pages scoring low in checks go to Review.
Regions (header, footer, navigation)The landmark regions that repeat across pages, with their links and structureThe site's Main navigation and Footer menus, the header and footer settings (logo, utility links, the call to action), and placements for what remains (an alert bar, a sidebar)The plan (navigation and regions), with a preview of the header and footer.
Theme and brandThe extracted tokens with their evidence (selector roles, counts), the logo candidates, screenshots of the home page and one content pageCorrected roles (which color is the brand's), the logo choice, font pairs with Google Fonts equivalents for licensed fontsThe plan (theme), with the contrast check: every pair the brand's contrast grid checks must pass AA, or the plan proposes the nearest passing shade and says so.
Alt textEach image missing alt text (the image, its file name, the sentence around it)Alt text (the existing alt task and prompt)Listed in Review as AI-written; a person can accept all or edit. Decorative images (in the chrome, spacers) get empty alt, not AI text.
SEO carry-overPages missing a title or description after the source's SEO data is carriedA title (10 to 60 characters) and description (50 to 160)Only for pages missing them; marked AI-written; source values are never replaced.
Quality reportThe original and new screenshots, the text and link diff, the issuesA short verdict per page ("The pricing table lost its third column") and a suggested fixReview. The verdict is advice; the score is computed, not AI-written.
Gap packagesThe gap's samples (rendered HTML and screenshots of the feature on the source)A declarative package, or AssemblyScript source when a template cannot do itThe generated module review screen, and the install click.

The quality report and the visual comparison

The score today counts retained words, images and links on each page; the test found it reads 95 when the site is visibly wrong. The new report keeps those measures and adds what a person would notice:

  • A visual comparison: a screenshot of the original page and of the new one (the release preview) at desktop and phone widths, a pixel difference after aligning the two (a perceptual diff, with the chrome compared separately from the main region), and the share of the page that differs.
  • Structure: the headings outline, the number of links in the navigation and footer, the forms and their fields, the images.
  • The chrome: header, navigation and footer present and matching.

The score becomes a weighted mix (content 50, structure 20, chrome 15, visual 15), with each part shown. Screenshots need a browser; see Decisions for where it runs.

AI cost

Decided 2026-11-18 (Kevin). The person sees the cost before the run and confirms it, and the run never spends past what they confirmed.

What pays. In this order:

  1. The migration allowance. Every site that runs on the host's AI gets a one-time migration allowance of AI tokens, big enough for a small migration: proposed at 300,000 tokens, which covers the plan and the run for a site of about 200 pages and five types with alt text (Kevin can change the size). It is used only by migrations, used first, and does not renew. A self-hosted site has no host to pay for an allowance, so it uses its own key from the start.
  2. The plan's AI credits on a hosted site, with Buy AI credits when they run short (the hosting platform's purchase options).
  3. The site's own key (bring your own key): a key added under Site settings → AI for the import task's provider replaces the host's AI, as it does for every task today. The provider bills it directly.

The estimate, step by step. Before the run, the plan shows a table the person confirms:

StepCallsTokens (low to high)Cost
Types and field mappingfrom the clusters and source typesmeasured from the requests the plan would sendin the unit of what pays
Block conversion helppages the converter scores low, from analysisper page, capped
Header, footer and navigation1 or 2
Theme and brand1
Alt textimages without alt textper image
SEO gapspages missing a title or descriptionper page
Quality verdictspages below the score thresholdper page
Gap packagesgenerated modules proposedper package
Total

Tokens are measured the way today's estimate is (the requests the plan would send, the answers estimated), with the low and high ends. Cost is shown in the unit of what pays: tokens from the allowance, AI credits on the plan, and, with the site's own key, an estimate in the provider's currency from a table of per-token list prices Spillway ships with each release (an admin can override it under Site settings → AI, and the screen says the provider's bill is what counts). The table also says how much of the allowance and credits are left after the run. Turning a step's AI off (for example alt text) updates the table at once.

Confirm. Approve the plan opens the estimate; Confirm and start starts the run with a migration budget equal to the high end of the confirmed estimate. Each step draws from it, and per-page uses are capped per page. A delta sync, a rerun and a reanalysis each show their own estimate and need their own confirmation when they would use AI.

When the budget runs out. The run stops cleanly: items in progress finish (each item's write is one transaction), no new AI call starts, and the migration becomes Paused: AI budget used up, with the stage checkpoints intact. The screen offers: Add to the budget (from the allowance or credits left, or after Buy AI credits), Use my own key (opens Site settings → AI), or Continue without AI (the heuristics take over for the rest). Continuing resumes from the checkpoints; nothing is redone. The same happens when the allowance, the credits or the site's monthly token cap run out mid-run (the host's AI answers 402, the AI layer refuses past the cap).

Costs stay proportional by design: the AI sees structure summaries and three samples per type, not every page; conversion help is called only for pages the deterministic converter scores low; alt text only for images without it; verdicts only for pages below a score. A 1,000-page site with 10 types should need tens of calls for the plan and at most a few hundred during the run.

Scale and robustness

The migration must take a site of several thousand pages and survive restarts, crashes, deploys, slow sources and partial failures without the person noticing more than a pause.

  • Background work, not requests. Every stage runs in the job runner, never inside an HTTP request. Today's classify, convert and land run inside the request; they move to the runner, and the routes start them and return at once. The admin polls (or listens to a server-sent event stream) for progress.
  • Picked up at once. Starting or continuing a migration wakes the runner directly instead of waiting for the next 30-second tick.
  • Work queue and leases. Items live in one table per migration with their status; workers claim items with a lease (an atomic update, as today's claimed_by and heartbeat_at do for the crawl) and renew it. An item whose lease expires (a crash) goes back to pending. Several instances can share one migration's work.
  • Checkpoints are the item statuses themselves: continuing a stage means claiming its pending and stale items. The 5-minute wait before a crashed crawl resumes shrinks to the lease length (one minute) for item work.
  • Idempotent writes. Every entity, term, media item, menu, form, redirect and shared block created by a migration has a row in a source map (migration_source_ref: migration, source id, target kind, target id, content hash, plan version, the revision written). A rerun finds the target by source id and updates it; the content hash skips items whose source has not changed. Entities also carry the source id in their metadata, so a lost map row can be rebuilt.
  • Memory. Items are read in chunks (today's 200-row chunks) and raw HTML is read from disk per item; nothing loads the whole site.
  • Rate limits. Per host, the delay the person chose (500 ms default, never under 100 ms), raised by Crawl-delay, and adaptive: a 429 or 503 with Retry-After pauses that host for the time given, repeated ones back off exponentially and, past a limit, pause the migration with the reason. Media from a CDN host gets its own limit. API pages use the API's maximum page size, so a WordPress site of 3,000 posts is 30 requests.
  • Auth. Credentials go only to the source host in an Authorization header over https; a source on plain http with credentials is refused (except an intranet site on a private address with SPILLWAY_ALLOW_PRIVATE_URLS=1). A 401 mid-run pauses with "The password was changed or revoked".
  • robots.txt. Respected for the crawl by default. With credentials, API reads are the owner's own access and are not subject to robots.txt; the crawl still is. The person may turn robots.txt off only for a verified domain: one where they have placed a token Spillway gives them, as a file at /.well-known/spillway-verify.txt, a <meta name="spillway-verify"> tag on the home page, or a DNS TXT record. Credentials alone do not count, since an editor's password does not make them the site's owner. The override and the verification are audited.
  • Failures per item. An item that fails is retried (three times, with backoff) and then marked failed with the reason; the stage finishes done_with_errors. Review lists failures with Retry. Only failures that make every remaining item fail (the source down for 15 minutes, the disk full) pause the migration.
  • Size limits stay as today (10 MB per page, 50 MB per asset, the byte budget), with the page cap raised to what the plan approved: up to 5,000 crawled pages, and up to 25,000 items when the connection has credentials and the API does the reading (the crawl then samples the rendered pages for the chrome, the theme and the visual comparison). Above those, the plan asks.
  • Storage. The migration's store (raw HTML, API responses, screenshots) is kept until the migration is archived, then pruned; the plan shows its size.

Cutover

Cutover is a step, not an afterthought, because it is where migrations go wrong.

  • Delta sync. The source map knows what was migrated and from which version. A sync asks the API for items modified since the last run (modified_after on WordPress, a changed filter on JSON:API), recrawls the sitemap for new and missing URLs (and lastmod), and fetches what changed. New items are added, changed ones updated (hand edits respected), deleted ones proposed for deletion (never deleted without the person). The sync lands in a new release, reviewed and merged like the first. A sync runs when someone starts it (Sync now, sync_migration, spillway migrate --sync); a schedule (nightly until cutover) is an option for later. The person can sync as often as they like; the screen says when the last one ran and what it brought.
  • Redirects. The full list of the source's URLs (crawl, sitemap, API permalinks, attachment pages, feeds, old redirects) is checked against the new site before cutover: each answers 200, or redirects to a page that does, in at most one hop. The ones that would 404 are listed with a proposed target (the same slug elsewhere, the parent section, the home page as a last resort), and Create redirects adds them. Chains are collapsed. Redirects off-site stay dropped unless the person keeps them, as today.
  • DNS help on hosted sites. The hosting platform adds the domain to the site, shows the records to set (an A/AAAA or CNAME, and the www variant), recognizes the registrar from the domain's name servers and links to its DNS page, checks the records until they resolve, issues the certificate, and says when visitors start reaching Spillway. Mail records (MX, SPF, DKIM, DMARC) are read before the switch and shown as "keep these", since changing name servers is where mail breaks.
  • Self-hosted sites get the records to set, the BASE_URL change, and the Go live checks.
  • Rollback. The source is never changed, so the rollback is DNS: the screen keeps the previous records (read before the switch) and shows them with Roll back for 30 days. On a hosted site, the platform can keep serving the Spillway site at its own address meanwhile. For content, a backup runs before the release merges, and Restore from Backups is the way back (with its Undo).
  • After the switch. The redirects misses list (the 404s visitors hit) is shown on the migration for 30 days with one-click redirects, and a checklist for search engines: the new sitemap submitted, Search Console verified for the domain, the old sitemap's URLs answering.

Hosting: Migrate a site on spillwaycms.com

On spillwaycms.com, Migrate a site is a way to start a site, next to starting from a kit. The person enters their current site's address on Start a site; the hosting platform creates a site on its plan, with AI on through the host's AI, and opens the new site's admin on the migration's Connect step with the address filled in. Analysis runs on the new site; the plan's estimate draws first on the site's one-time migration allowance, then on the plan's AI credits, with Buy AI credits when it needs more, or on the site's own key (AI cost). Cutover uses the platform's domains and certificates, so the DNS help is complete: records, checking, certificates and rollback guidance. While registration is by invitation, the address becomes part of the early access request, and the first analysis can run as a preview (inventory and plan only, nothing created) to show what the migration would do.

The hosting code is private; this document describes only what the person sees. The platform needs from Spillway: a way to open a new site on a given step with a given address (a setup token that the site's admin reads), the migration's status for the hosting dashboard, and the cutover's domain step calling the platform's domain API.

The admin

The migration lives under Structure → Import and migrate (today's Import, renamed). The list shows migrations and today's imports together: source, status, progress, what it needs, last activity. Migrate a site starts one; on a new site with no content of its own, the dashboard shows a Migrate a site card. The existing wizard stays for quick imports (part of a site into an existing one) and becomes Import pages.

The migration screen

┌───────────────────────────────────────────────────────────────────────────────────────────────┐
│ ← Import   www.example.edu  ● Running            WordPress 6.8 · started 14:02    [Pause] [⋯] │
│ ┌─────────┬──────────┬────────┬─────────┬─────────┬─────────┬──────────┐                      │
│ │✓ Connect│✓ Analyze │✓ Plan  │● Run    │ Review  │ Publish │ Cut over │                      │
│ └─────────┴──────────┴────────┴─────────┴─────────┴─────────┴──────────┘                      │
│                                                                                               │
│ ┌ Needs you (1) ──────────────────────────────────────────────────────────────────────────┐   │
│ │ 14 pages under /events use a layout the plan did not cover.  [Map to Events] [Choose…]  │   │
│ └─────────────────────────────────────────────────────────────────────────────────────────┘   │
│                                                                                               │
│ Run  ███████████████░░░░░░░  64%   about 12 minutes left · AI 41,200 of 120,000 tokens        │
│                                                                                               │
│  Media        ████████████████████  1,204 of 1,204   ✓            3 failed  [View]            │
│  Types        ████████████████████  9 of 9           ✓                                        │
│  Content      ██████████░░░░░░░░░░  512 of 812       ● Programs (now: /programs/nursing)      │
│  Regions      ░░░░░░░░░░░░░░░░░░░░  waiting for content                                       │
│  Forms        ████████████████████  4 of 4           ✓                                        │
│  Redirects    ░░░░░░░░░░░░░░░░░░░░  waiting for content                                       │
│  Theme        ████████████████████  ✓  Applied to the brand draft  [Open]                     │
│                                                                                               │
│ ▾ Log                                                                     [Only problems ☐]   │
│   14:31  Programs: 48 of 62 done                                                              │
│   14:30  Retrying /about/history (the source answered 503; waiting 20 s)                      │
│   14:29  Media: 3 files were over 50 MB and were left on the source as links                  │
└───────────────────────────────────────────────────────────────────────────────────────────────┘
  • The header: source, status badge, platform, start time, Pause or Continue, and the menu (Reanalyze, Rerun…, Restart a stage…, Delete credentials, Archive, Delete).
  • Needs you is always on top when anything waits for the person, with the action inline. The bell and an email say the same.
  • The progress area shows each stage with its bar, counts, current item, failures and a link to the stage's items.
  • The log is in plain words, newest first, with Only problems; the technical log (today's) is behind Details.

The plan screen

┌ Plan  version 2 · approved by Ada at 13:58 ─────────────────────────────────────── [Approve] ┐
│ ✓ Content types        9 types · 2 map to yours · 7 new                            [Change]  │
│ ! Field mappings       4 fields to check (confidence under 70%)                    [Check]   │
│ ✓ Vocabularies         Categories (38) · Tags (212) · Departments (14)             [Change]  │
│ ✓ Media                1,207 files · 2.1 GB · 3 over the size cap                  [Change]  │
│ ✓ Navigation           Main (7 items) · Footer (12) · header and footer previews   [View]    │
│ ● Forms                Contact (CF7) → Spillway form · Apply (Gravity) needs you   [Decide]  │
│ ✓ URLs and redirects   798 kept · 14 change (non-Latin slugs) · 61 from Redirection [View]   │
│ ✓ SEO                  Yoast titles and descriptions on 790 pages                  [View]    │
│ ✓ Theme and brand      palette · 2 Google Fonts · logo · contrast passes AA         [View]    │
│ ✓ Design direction     Refresh (suggested: contrast fails on 38% of pages) · home Familiar  [Change] │
│ ! Gaps                 Tabs (23 pages): generated block · Slider (1): first image   [Review]  │
│ ✓ Authors              12 authors kept as bylines · nobody emailed                 [View]    │
│ ✓ Not migrated         comments (dropped) · WooCommerce (links kept)               [Change]  │
│   Estimate             about 35 minutes · 2.4 GB · AI 96,000 to 120,000 tokens     [By step] │
└──────────────────────────────────────────────────────────────────────────────────────────────┘

A section opens in place. Content types shows each type as a row (source type → target, page count, field count, confidence) and opens to the field table: source field, sample value, target field, type, confidence bar, reason. Gaps shows each gap with the ladder's options as a radio group, the pages that use it, and for a generated module the review screen described above. Approve opens the AI estimate by step (the table in AI cost) with what pays for it and Confirm and start.

Review

┌ Review   790 good · 18 to check · 4 failed                     [Filters ▾]  [Publish…]       ┐
│ Type [All ▾]  Section [/news ▾]  Score [below 80 ▾]  Issue [any ▾]  Status [not reviewed ▾]   │
│ ┌──────────────────────────────────┬───────────┬───────┬──────────────┬──────────────────┐    │
│ │ Page                             │ Type      │ Score │ Issues       │                  │    │
│ │ /news/spring-open-house          │ News      │  92   │ none         │ Compare  Fix     │    │
│ │ /programs/nursing                │ Programs  │  64   │ visual 31%   │ Compare  Fix     │    │
│ └──────────────────────────────────┴───────────┴───────┴──────────────┴──────────────────┘    │
└───────────────────────────────────────────────────────────────────────────────────────────────┘

Compare opens a full-width view: the original and the new page side by side (desktop and phone toggles), a Difference overlay, the text view, the issues, the AI's verdict, and the actions: Fix this page, Fix every page like this, Ask AI to fix, Mark as reviewed, Skip this page. Arrow keys move to the next page in the filter.

Everything uses the admin's components (DataTable with saved views, dialogs with focus trap, live regions for progress), and is keyboard reachable. The screens need imports.manage; installing a registry module from a gap needs site.settings (and users.manage for a trusted one), a generated declarative module site.settings and a generated module with code users.manage; inviting an author needs users.manage; publishing needs content.publish; the cutover's domain step needs users.manage.

The MCP and agent tools

An agent should be able to run a migration for someone end to end, stopping for the same decisions. The tools, in the imports toolset (today's import tools stay):

ToolDoesPermission
start_migrationCreates a migration from an address, an uploaded export file id, or a connection (credentials are never passed through MCP: the tool returns a link for the person to enter them) and starts analysisimports.manage
get_migrationStatus, stages, progress, what needs input, the AI usedimports.manage
get_migration_planThe plan as structured data, with each decision, its default, its options and its confidenceimports.manage
update_migration_planChanges decisions (map a type, a field, a gap's rung, a redirect rule) and returns the new plan versionimports.manage
approve_migration_planApproves a plan version and starts the run, confirming the estimate it names. Refused while decisions are open. An agent may confirm AI use only within the migration allowance; when the run would draw on AI credits or the site's own key, the tool returns needs_input with a link for the person to confirm the cost.imports.manage
pause_migration, continue_migrationimports.manage
rerun_migrationReruns a stage, a type, a section, a set of pages or one pageimports.manage
list_migration_itemsItems by stage, status, type, section or issue, with their source ids and targetsimports.manage
compare_migration_pageThe original and new page: text, structure, issues, the visual difference score and screenshot URLsimports.manage
fix_migration_pageProposes a fix (a block change, a field value) as a draft revisioncontent.edit on the entity
sync_migrationStarts a delta syncimports.manage
check_migration_redirectsThe cutover's redirect check and its proposalsimports.manage
create_migration_redirectsCreates the proposed redirectssite.settings

No tool installs a module, invites an author, confirms paid AI use, publishes, merges the release, changes DNS or enters credentials: those need a person, and the tools that lead to them return a link to the screen where the person does it (as propose_task does for agents today). The site agent gets the same tools, so a person can say "migrate www.example.edu and tell me what you need" and come back to a plan with the agent's notes. Every call is audited with the agent as the actor. Tool results that contain source content are data, not instructions, and the migration's AI prompts say so.

Data model

New tables (numbered migrations, both dialects):

  • migration: id, site, source (address, platform, version), connection (kind, encrypted credentials or null, export file id), status, plan version approved, release id, the confirmed estimate, the budget and AI used by step, what pays (allowance, credits, own key), created by, timestamps, claimed_by and heartbeat for the coordinator.
  • migration_plan: migration, version, the plan as JSON (types, fields, vocabularies, regions, forms, redirect rules, theme choices, gaps and their rungs, users, exclusions), created by (person or AI), approved by and when.
  • migration_stage: migration, stage key, status, plan version, counts, checkpoint, timestamps.
  • migration_item: migration, stage, source id, kind, status, tries, error, lease (claimed_by, lease_until), content hash, plan version, target kind and id, revision written, quality.
  • migration_source_ref: the source map (source id to target), unique per migration and source id; also used by the delta sync and by redirects.
  • migration_event: the plain-language log, with a level and an optional item.
  • migration_author: migration, source id, name, email when known, item count, the invited user once invited.
  • The site's migration allowance (granted and used, in tokens) on the AI settings row, and ai_log rows tagged with the migration and its step, so the estimate can be compared with what was used.
  • On installed modules: the source generated, the migration, the source and template hashes, the granted capabilities and hosts, the reviewer and the instance signature.

Today's import_job, import_page, import_queue, import_asset, import_redirect, import_menu and import_cluster stay and serve the analysis stage (the crawl and the clusters); a migration owns one import job for its crawl.

Phases

Each phase ships on its own and leaves the importer better. Acceptance tests run against the three sites of the test: the local WordPress (theme unit test data, Twenty Twenty-One, the Programs type, a CF7 form, the primary menu), the local Drupal Umami (English and Spanish, JSON:API, the Redirect module) and a public static marketing site with a small cap; scripted like that test, kept under e2e/fixtures/ where they can be (the WordPress and Drupal sites as a reproducible container setup run in CI nightly, not on every pull request).

Phase 0: fix what blocks today's importer (days)

  • Follow redirects to a trailing slash; failed fetches do not count against the page cap.
  • Never make two types for one path pattern; detect archive and listing pages and skip them by default.
  • Leave comment, sign-in, search and password forms out.
  • Fix the "checks every second" text, wake the runner when a job starts, and correct importer.md's claim about crawled navigation.

Accepted when: the WordPress site with its default permalinks (trailing slashes) imports 150 of 150 pages; the WordPress import creates no pages_2, categories or guide_guides type; no Form block comes from a comment form; a new job starts crawling within 2 seconds.

Phase 1: structure from the source, and the chrome (the most value)

  • Types from the source's own types (WordPress post types, Drupal bundles), with their fields and field types; existing types matched; vocabularies and terms created and assigned; translations as translations.
  • Header, navigation and footer from the crawl: the repeated landmark regions become the Main navigation and Footer menus (and the adapters' menus when present, merged by link), the logo and site title from the header, placements for what remains.
  • Forms: Contact Form 7, Gravity Forms, WPForms, Webform and plain HTML forms become Spillway forms with their fields, the blocks reference them, and the plan asks where submissions go (default: email the site's admins).
  • SEO: Yoast, Rank Math and Metatag titles, descriptions, canonical and robots carried to the SEO fields.
  • Media originals instead of derivatives when the API names them.

Accepted when: WordPress lands Posts on the existing post type, Pages on page, Programs as a new type with credits (number), degree (text) and department (taxonomy) filled on all 8, Categories and Tags as vocabularies with the posts tagged; the release preview of any page shows Programs, Apply, Contact us and News in the header; the Contact page has a working Spillway form that accepts a submission. Drupal lands Recipe with its 10 fields filled (cooking time, servings and the rest), Spanish recipes as translations of the English ones, tags and recipe categories as vocabularies, the Umami main menu (Home, Articles, Recipes) in the header from the crawl. The static site's header shows its navigation links.

Phase 2: the migration job (resumable, background, plan first)

Status: built 2026-11-19. The tables (migration 0084), the stages and items with leases, the source map, the runner, pause, continue, rerun by stage, type, section, pages or items, reanalyze, hand edits that survive reruns (entities and shared blocks), the four connections, domain verification, the items cap, authors as bylines with Invite, comments dropped or kept as text, items the API read that the crawl never reached, listing pages as Collection pages, the inventory, the mapping table with rungs 1, 2 and 4, the plan and run screens, the log, the email and bell notifications, and the MCP tools of phase 2 (compare_migration_page, fix_migration_page, sync_migration, check_migration_redirects and create_migration_redirects come with phases 3 and 5). Where it differs from the text above: the content stage also waits for the forms stage, so Form blocks point at the forms; the checks stage comes with phase 3; Restart puts a stage's items back but does not offer Remove what this stage created; Invite gives the author the items when the account is made (at the invitation) rather than when it is accepted; hand edits are detected on entities and shared blocks, not yet on menus and the brand draft; the export file is WordPress's (a static site zip and a Spillway export come later); the migration tools are for MCP clients, not yet the Site agent; there is no spillway migrate command and no Migrate a site card on the dashboard yet. The acceptance below is checked by packages/core/src/test/migration.test.ts against the fake WordPress and Drupal sites (test/fixtures), and the screens by e2e/smoke-import.mjs.

  • The migration tables, stages, items, leases and the source map; every stage in the runner; pause, continue, rerun by type, section or page; hand edits survive reruns.
  • Connect (address, WordPress application password, Drupal Basic auth, WXR file; credentials refused over plain http), domain verification for the robots.txt override, the 25,000-item cap with credentials, authors as bylines with Invite, comments dropped or kept as text, analysis with the inventory, the plan screen with defaults and open decisions, the run screen, the plain-language log, email and bell notifications.
  • The mapping table (core, registry, needs a module) and the gaps section with rungs 1, 2 and 4 (registry module, core setting, embed or HTML).

Accepted when: a WordPress migration with an application password reads menus through the API and Redirection's redirects; killing the server mid-content stage and starting it again resumes within a minute with no duplicate entity (the count of entities equals the count of source items); rerunning only Programs after changing a field mapping updates the 8 programs in place and leaves a page edited by hand untouched (marked "edited by hand: not updated"); pausing during media and continuing finishes with every file once; a WXR export of the same site produces the same plan as the API connection; the WordPress migration sends no email and lands every post's author as a byline, and Invite on one author sends one invitation; comments are absent by default and, with Keep comments as text, appear under each post without email addresses; credentials for http:// are refused; the robots.txt switch is unavailable until the domain's verification file is in place.

Phase 3: review, the visual comparison and AI help

Status: built 2026-11-19. The checks stage with the score (content, structure, chrome, visual) and the screenshots from the optional renderer (scripts/renderer.mjs, SPILLWAY_RENDERER_URL, the renderer profile of the compose file), with frames side by side in the admin without it; Review with its filters and summary, Compare, Fix every page like this, Ask AI to fix, Mark as reviewed and Skip this page; the AI steps (field mapping with confidence during analysis, conversion help, regions, theme roles with the contrast check, alt text, SEO gaps, verdicts); the design direction with its four stops, the suggestion, Advanced and overrides per type, previews of three pages, re-applying without a crawl, Compare with the original's slider, never worse, and site components for repeated sections; the migration allowance, the estimate by step with its cost, Confirm and start, the budget, the clean stop, Add to the budget and Continue without AI, and the MCP tools get_migration_estimate, add_migration_budget, set_migration_design, list_migration_review, compare_migration_page and fix_migration_page (tables in migration 0087). Where it differs from the text above: rung 3 builds site components (drafts) rather than patterns, and rungs 4 (scoped site CSS) and 5 come with generated modules; the look has no override per type; the AI theme step corrects the roles of the colors, not the logo choice or the font pairs (Refresh uses the body font for headings when the heading font cannot be served); the allowance is counted per instance (a hosted site is one), the hosting plan's credits are shown when the platform's usage answers; the verdict and Ask AI to fix see the pages' text and structure, not their screenshots; Ask AI to fix is the person's own request and is not held to the run's budget; the acceptance is checked by packages/core/src/test/migration-phase3.test.ts against the fake WordPress, Drupal and static sites and a fake renderer and provider, and the screens by e2e/smoke-import.mjs with the real renderer.

  • Screenshots and the visual difference per page (desktop and phone) from the optional renderer container, with side-by-side frames in the admin as the fallback; the new score, Review with filters and Fix every page like this.
  • AI: field mapping with confidence, conversion help for low-scoring pages using the site's blocks, patterns and shared blocks, regions, theme roles with the contrast check, alt text, SEO gaps, verdicts.
  • Design direction: the four stops with live previews of three of the site's pages, the suggestion with its reasons, Advanced (Look and Layout) and overrides per page type, re-applying a new direction without crawling again, Compare with the original, and the ladder of site-specific pieces (Design direction).
  • AI cost: the one-time migration allowance, the estimate by step with its cost in the unit of what pays, Confirm and start, the migration budget, and the clean stop and resume when it runs out.

Accepted when: the new score tells good from bad: the Drupal recipe page as today's importer lands it (structure flattened, no header navigation) scores under 80, and the same page after phase 1 scores over 90, with the visual difference shown at both widths; with AI on, the plan for the static site names its types and maps fields with confidences, and the run stays within the estimate's maximum; the estimate shows every step with tokens and cost, and a hosted test site draws first on its allowance, then on credits; with the budget set below the estimate the run stops at Paused: AI budget used up with no item half written, and Add to the budget resumes from the checkpoint with no item done twice, as does Continue without AI; an agent's approve_migration_plan beyond the allowance returns needs_input; without the renderer, Review still shows both pages side by side; moving the WordPress test site from Refresh to Match and back changes its theme and layouts without a new crawl and keeps a hand edit made in between; the static site is suggested Refresh with its reasons; the WordPress theme's primary color is the theme's (not #ff6900) and the logo is the site title or the real logo; every color pair passes AA or the plan says which it changed.

Phase 4: gaps that need modules

Status: built 2026-11-19. Install for a gap's registry package (through installModuleFromRegistry, so the registry's trust and locked-down mode apply), rung 3 offered for every needs a module feature but a shop or a forum, rung 3 by default at Match for a feature on five pages or more (rung 5 of the design ladder), Generate the module (the AI step packages), declarative packages on one fixed renderer and AssemblyScript packages built by the isolated builder, the checks (capabilities, manifest, template, scoped CSS, build and reproducibility, size, sample renders in the sandbox, random props), the review screen (/admin/modules/generated/:id), Install in a session only with the hosts ticked by hand (users.manage for code), the instance's signature checked on every load (Changed since review), placement of the installed module's blocks by the content stage with their scoped CSS (rung 4) on the pages, Remove with or without the HTML rung, Generated for this site under Modules, and the MCP tools generate_migration_module (a proposal) and list_generated_modules (tables in migration 0099). Where it differs from the text above, see Decisions (phases 4 and 5). The acceptance is checked by packages/core/src/test/migration-phase4.test.ts against a fake static site with an accordion and a share script, a fake registry and a fake provider; the WordPress gallery and the Umami recipe card are not features of the fake sites, so the accordion stands in for a declarative gap and a variant of it with code (a feed it may not reach) for a gap that needs logic.

  • Registry module install from the plan; the HTML rung with what is lost.
  • Generated modules, declarative first and then with code: the isolated builder, the review screen, host grants, the instance signature checked on load, removal with the HTML rung.

Accepted when: the WordPress gallery and the Umami recipe card each get a declarative proposal that renders the source's samples in the sandbox; a gap that needs logic (a filter over the Programs list) gets an AssemblyScript module that builds reproducibly with no network and renders its samples; the review screen shows the code or template, each capability in plain words and any host unticked; nothing installs without the person's click (an MCP call returns needs_input), and a module with code needs an admin; a manifest asking for hooks, mail or the trusted tier is refused, even with SPILLWAY_TRUSTED_MODULE_INSTALL=1; a module installed without its host gets an error from sw_http and shows its fallback; changing one byte of an installed .wasm stops it loading with Changed since review; removing it changes no content and offers the HTML rung, and pages then show what the block last rendered.

Phase 5: cutover and hosting

Status: built 2026-11-19, except Migrate a site on spillwaycms.com (the hosting platform's). Sync now (sync_migration), the redirect check with proposals and Create redirects (check_migration_redirects, create_migration_redirects), the domain's records checked live with a status each and the mail records to keep (check_migration_dns), a link to the hosting platform's Domains tab on a hosted site, the checklist, Go live, Roll back within 30 days, and after the switch the 404s and the search engine checklist (get_migration_cutover). The acceptance is checked by packages/core/src/test/migration-phase5.test.ts against the fake WordPress site (a post added and a page edited on the source after the run; a page deleted and a redirect chain on the new site) and a fake DNS resolver; the hosted domain step (the platform adding the domain, checking it and issuing the certificate) is the platform's and is checked there.

  • Delta sync, the redirect check with proposals, DNS help on hosted sites, rollback guidance, the 30-day watch.
  • Migrate a site on spillwaycms.com.

Accepted when: after the WordPress migration, adding a post and editing a page on the source, then Sync now, brings over exactly those two changes into a new release, and nothing syncs until someone starts it; the redirect check reports every crawled source URL as answering or redirected in one hop on the new site, with proposals for the rest; on a hosted test site the domain step shows the records, detects them once set, and keeps the previous records for Roll back.

Later

More sources (Squarespace and Wix exports, Webflow, Joomla, HubSpot), comments as live comments, membership rules, e-commerce, delta sync on a schedule until cutover (an option), more capabilities for generated modules if real migrations need them (each its own decision).

The current importer: what stays and what changes

TodayIn the migration
The crawl (runner.ts, crawl.ts), robots, sitemaps, the SSRF guard, budgetsStays as the analysis crawl; the trailing-slash fix; failures do not count against the cap.
Extraction (extract.ts)Stays; also keeps the header, navigation and footer regions (today it strips and drops them) for the regions stage.
Adapters (WordPress REST, Drupal JSON:API), anonymousBecome the API readers of analysis, with credentials, every resource in the inventory table, and pagination; their findings drive types, fields, vocabularies and translations instead of hinting at labels.
Clustering by URL pattern and skeleton (cluster.ts)Stays for sites without an API and for splitting source types; no two types per path pattern; archives recognized.
Type proposals, one AI call (classify.ts)Become the plan's types section; AI adds field mapping with confidence.
Source rules for fields (sources.ts, fields.ts)Stay for crawled sites; API sites map fields directly.
Conversion into core blocks (convert.ts)Stays as the deterministic converter; AI help for low scores; module blocks and the site's patterns become targets.
Shared blocks from fragments on three or more pagesStays, plus the regions; chrome-like fragments (comment forms, sidebars) go to placements or are left out.
Theme extraction (theme.ts)Stays; AI corrects roles and the logo; fonts mapped; the contrast check; fewer custom tokens shown.
Landing (land.ts), one requestSplit into the run's stages, in the runner, item by item, with the source map.
Quality score (report.ts)Kept as the content part of the new score.
The five-step wizardStays as Import pages for importing part of a site into an existing one.
spillway import <url>Gains `spillway migrate <url
MCP import toolsStay; the migration tools are added.

Security

  • Read-only on the source: adapters send only GET and HEAD. A test asserts no other method reaches the transport.
  • Credentials: refused over plain http, encrypted with the instance key, sent only to the source host over https, never logged, never returned by the API or MCP, deleted on archive or delete and on request; the screen says which permissions the account needs and recommends a read-only account.
  • Everything outbound goes through the SSRF guard, as today; SPILLWAY_ALLOW_PRIVATE_URLS stays the only way to migrate an intranet site.
  • Everything inbound is untrusted: HTML through the sanitizer, CSS tokens filtered (as today), scripts never carried (only recognized and mapped to settings), files type-checked and sniffed, archives (a static zip) unpacked with path, count and size limits.
  • AI prompts treat source content as data, never instructions; the AI has no tool that installs, publishes or changes DNS.
  • Generated modules as above: always sandboxed with a short list of capabilities, no network unless a person grants a host, built in an isolated builder, reviewed and installed by a person, signed by the instance and checked on every load, never trusted.
  • Personal data: authors stay bylines and nobody is emailed by a migration; comments are dropped unless kept as text, and then without emails or IP addresses.
  • Nothing publishes without a person: the run lands drafts in a release; publish and cutover are explicit steps.

Decisions

Decided 2026-11-18 (Kevin)

  1. Generated code is allowed. Generated modules may be declarative or contain code. A person reviews and clicks to install every one, every one runs in the module sandbox, and nothing generated is ever trusted. The safety model is in Generated modules: the allowed capabilities, no network unless a host is granted, the isolated builder, the review screen with the code and the capabilities, the instance signature checked on load, and removal.
  2. Authors stay bylines. Nobody is emailed. An admin can invite any author later with one click (Authors).
  3. Comments are dropped by default. Turning them on keeps them as static text under each post (Comments).
  4. AI cost. Every site gets a one-time migration allowance big enough for a small migration; after it, the migration draws on the plan's AI credits (with purchase options) or the site's own key under Site settings → AI. Before a run, the migration screen shows the estimated tokens and cost by step and the person confirms; when the budget runs out the job stops cleanly and can be resumed (AI cost).

Decisions (phases 4 and 5)

Made while building phases 4 and 5, on 2026-11-19, where the text above left a choice open. Each can change.

  1. One language for generated code: AssemblyScript, pinned. The declarative renderer, the prelude every generated module gets (JSON, escaping, the host calls) and generated code are all AssemblyScript built with the exact compiler version in core's package.json (assemblyscript 0.28.20, a new dependency of core: about 18 MB on disk, most of it binaryen). The renderer's bytes are committed (modules/generated/renderer-wasm.ts, rebuilt by packages/core/scripts/build-module-renderer.mjs) and a test rebuilds it to the same hash.
  2. Templates are data the host passes in. A declarative module's .wasm is the fixed renderer, the same bytes for every such module; its templates and CSS sit beside it in generated.json and reach the renderer with each render call. The signature covers generated.json, so a changed template is a changed module.
  3. The isolated builder is a Node process under the permission model. Reads only the toolchain, no writes, no child processes, an empty environment, the network taken away before the compiler loads (the compiler's own data: fetch excepted), one minute and 512 MB. A hosted platform that wants a container instead names a command with SPILLWAY_MODULE_BUILDER; the protocol is JSON on stdin and stdout.
  4. Permissions follow each area's own. Installing a gap's registry package needs modules.manage (as Modules does; site.settings in the text above), a declarative generated module modules.manage and one with code users.manage as well; creating redirects from the check needs redirects.manage; Go live and Roll back need users.manage and a signed-in session.
  5. Install is installing and turning on, and only a person does it. Generating proposes; the migration never installs or enables anything; Install on the review screen is the approval and turns the module on. An update is a new version reviewed again; the installed one keeps running until the new one is installed.
  6. Generation is the person's request. The packages AI step runs when someone presses Generate the module (or an agent calls generate_migration_module), like Ask AI to fix: it is shown in the estimate, counted per step, and not drawn from the run's budget. An agent may generate only within the one-time migration allowance.
  7. Generated blocks keep prose markup. A sandboxed block's HTML goes through the rich text sanitizer, which keeps no classes, details or scripts, so an accordion becomes its questions and answers as headings and text, styled by its scoped CSS. Carrying behavior (opening and closing) would need the sanitizer to allow more, which is left for a decision of its own.
  8. Rung 4 is the generated block's own CSS. Scoped site CSS is built only as part of a generated block (rules under the block's class, the style allow-list in modules/generated/package.ts), reviewed and signed with it. A site-wide CSS layer over the core blocks is left out: the tokens, block styles and site components cover the rest, and never worse is easier to keep without it.
  9. Placement is a content rerun. Once installed, Place it on the pages reruns the content stage: each element the block's extraction rule matches in the raw page becomes the module's block in its place, with its props read from the element; pages edited by hand stay as they are.
  10. A sync reads everything again. Sync now runs the analysis again (the API with the connection's credentials, then the crawl) and lands only what changed by content hash; modified_after and changed filters are an optimization for later. It uses the heuristics, not AI, so it needs no confirmation, lands into the run's release while that is open and into a release of its own after, and is refused after Go live.
  11. What the source removed is a proposal. A sync lists the pages the source no longer has; Remove the pages picked removes them in the sync's release, so they go when it is published.
  12. The redirect check answers like the site. It reads the site's pages, the migration's open releases and the redirect table rather than requesting each URL, so it costs nothing and runs before anything is published; a page in an open release counts as answering once published.
  13. Go live owns the publish it does, and Roll back undoes exactly that. Go live publishes the migration's releases still open, makes the redirects the check proposes, sets the site's own address (BASE_URL, when set, stays the server's and the checklist says to change it) and keeps the DNS records as they were. Roll back reopens the releases Go live published (pages it created back to drafts in them, pages it updated back to the revision before, pages it removed back), removes its redirects, restores collapsed chains and the address, and shows the old records. A release published before Go live stays published; Restore under Backups is the way back for that and for later changes.
  14. On a hosted site the domain step is a link. The hosting platform's Domains tab adds the domain, checks the records and issues the certificate; the hosting summary may carry a domains link for it (else the site's page on the platform). The previous records are still read and kept for Roll back.

Defaults (Kevin can change)

  • Design direction: the stop the analysis suggests, Refresh when nothing points elsewhere; generated blocks only at Match unless the person chooses otherwise.
  1. Screenshots run in an optional renderer container (Playwright and Chromium, set by an environment variable on self-hosted instances, run by the platform for hosted sites). Without it, the admin's browser is the fallback: Review shows the original and the new page side by side in frames, without a computed difference, since a page cannot capture another site's frame. As built in phase 3: scripts/renderer.mjs (the renderer compose profile), named by SPILLWAY_RENDERER_URL; Spillway sends it each page's HTML with the address its files load from and computes the difference itself, and the score scales its other parts to 100 without it.
  2. robots.txt can be overridden only for a domain the person has verified (a file, a meta tag or a DNS record; credentials alone do not count).
  3. Credentials over plain http are refused, except for an intranet site on a private address on an instance run with SPILLWAY_ALLOW_PRIVATE_URLS=1.
  4. Names in the admin: Structure → Import and migrate, with Migrate a site for the new flow and Import pages for today's wizard; a new site with no content of its own shows a Migrate a site card on the dashboard.
  5. The page cap stays 5,000 crawled pages, and rises to 25,000 items when the connection has credentials and the API does the reading.
  6. Delta sync runs only when someone starts it; a schedule (nightly until cutover) is an option for later.
  7. The migration allowance is proposed at 300,000 tokens (the size of a small migration as estimated above).

Spillway 0.1.24

Was this page helpful?