migrate
Apply DESIGN, canon, and modules to every page in the inventory, producing a deployable static HTML site. Three render branches (approved page, template-applied sibling, unique render). Per-page, incremental, idempotent, content-preserving by default.
What this skill does
# stardust:migrate
Apply the target spec authored by `direct`, the visual canon
written by `prototype --prep`, and the brand-module catalog
extracted during `prepare-migration` to every page in the
inventory. Produces a self-contained, deployable static HTML site
under `stardust/migrated/`. Per-page, incremental, idempotent.
`migrate` is the final stardust phase. Output is platform-
agnostic HTML — downstream conversion (AEM EDS, a CMS, a
framework) is the job of a separate plugin that consumes
`migrated/` plus `DESIGN.json` plus the per-page `_meta.json`
sidecars.
## Inputs
- `<slug>` — optional positional. Migrate just this page. Without
it, migrate every page whose status is `directed`,
`prototyped`, or `approved` (and not `stale`).
- `--all` — migrate every page including stale ones.
- `--force` — re-migrate every page even when the idempotent
skip would skip them.
- `--require-approved` — refuse to migrate any non-`approved`
page. Default behaviour migrates `directed` pages too (using
Path A′ or Path B per
`reference/template-and-module-rendering.md`); this flag flips
approval-gating on.
- `--strict-canon` — refuse approvals that conflict with canon.
Default logs the deviation and continues. Useful for projects
where canon discipline matters more than per-template
flexibility.
- `--clean` — delete assets previously bundled but no longer
referenced from `stardust/migrated/assets/`. Off by default
(migrate is additive). **Implies `--force`**: every page is
re-rendered so the run's `bundledAssets` Set is the complete
union of currently-referenced assets — otherwise `--clean`
would risk deleting assets still referenced by
idempotent-skipped pages. See
`reference/asset-bundling.md` § Stale asset cleanup.
- `--pin-timestamp <ISO8601>` — pin the migrate-provenance
timestamp so re-runs without source changes produce byte-
identical HTML. Default re-uses the current wall clock, which
is fine for normal use; CI deployment fingerprinting may want
the pin.
The mobile-adapt audit, content-sourcing scan, and placeholder
refusal are all mandatory gates — there is no `--skip-*` or
`--allow-*` flag to bypass them. If a gate refuses a page, the
remediation is to fix the proposed file (re-prototype, edit
inline, or run an impeccable command) and re-invoke migrate.
## Setup
1. Run the master skill's setup
(`skills/stardust/SKILL.md` § Setup).
2. Verify `stardust/state.json` exists with at least one
`directed` page.
3. Verify project-root `DESIGN.md` and `DESIGN.json` exist with
`DESIGN.json.extensions.canon` populated. If canon is empty,
recommend `$stardust prepare-migration` and stop.
4. Verify `stardust/canon/` exists with at least
`header.html`, `footer.html`, `canon.css`. Otherwise prep
hasn't completed; recommend `$stardust prepare-migration`
and stop.
5. Verify `stardust/direction.md` has an active (not pending)
direction.
6. Read `state.json.pages[]` and partition into:
- **inScope**: status `directed`, `prototyped`, or
`approved`, `stale: false` (or `--all` / explicit
`<slug>`).
- **skipped**: everything else, with reason captured.
7. **Validate provenance on every in-scope page.** Call
`validateProvenance(page)` per
`skills/stardust/reference/state-machine.md` § Provenance
validation for every page in `inScope`. Abort with the
helper's error when any page lacks live-render evidence —
migrating a synthesized page record produces deployable HTML
that misrepresents the source site, the exact failure mode
that motivated the validator. Surface `Provenance OK on N
pages` in the migrate-plan output before Phase 1.
8. **Mobile-adapt audit on every Path A / Path A′ source.** For
every page whose render branch consumes a proposed or
archetype HTML file (Path A, Path A′ per
`reference/template-and-module-rendering.md` § Render path
selection), run the audit per `skills/prototype/SKILL.md`
§ Mobile-adapt audit:
- `<meta name="viewport" content="width=device-width, ...">`
present, width not pinned to a fixed pixel value.
- At least one `@media (max-width: ...)` rule.
- At least one mobile-targeted breakpoint at ≤ 640px.
Refuse pages that fail — the audit is mandatory; there is no
skip flag. The user fixes the proposed file (re-prototype or
chat-driven impeccable command) and re-invokes migrate.
Record the audit result per page in the migrate report and
in the post-render `_meta.json#audit.adapt` sidecar. Path B
(unique-renders) skips the audit because adapt hasn't run
on those pages — a Path B page that needs mobile coverage
gets it via `$impeccable adapt` invoked separately by the
user. Surface this distinction in the report so it's not
read as a silent skip.
## Procedure
### Phase 1 — Plan
Print the plan and wait for confirmation when the scope is large:
```
migrate plan
============
In scope: 127 pages
Path A (approved) 6 pages: home, news/post-housing-summit, news, ...
Path A' (template-applied) 118 pages: 84 article, 5 listing, 11 program, 2 form, 16 static
Path B (unique) 3 pages: 404, search, faq
Skipped: 0 stale, 0 unscoped
DESIGN.md sha: 1a2b3c4
DESIGN.json sha: 5d6e7f8
Canon shas: header:7g8h9i footer:9i0j1k css:1k2l3m
Output: stardust/migrated/ + per-page _meta.json sidecars
Idempotent skip: enabled (run with --force to override)
Reply "go" to proceed.
```
For 1-3 pages or `<slug>` invocation, skip the confirmation.
### Phase 2 — Per-page render
For each page in scope, follow
`reference/migration-procedure.md` and
`reference/template-and-module-rendering.md`:
- **Idempotent skip check** first (sha-compare across
`designMd`, `designJson`, `sourceCurrent`, `sourceProposed`,
`canonShas`, `archetypeSource`).
- **Placeholder gate** (Path A and Path A′ only — pages with a
proposed file or archetype). Refuse when `[data-placeholder]`
elements or non-empty `_provenance.unsourcedContent[]` are
present — the user fills the missing content in the proposed
file before re-invoking migrate. No bypass flag.
- **Render branch selection** (LLM judgment per T&M §
Render path selection): A / A′ / B.
- **Render** per the chosen branch's procedure in T&M.
- **Canon application** — chrome injection, canon.css
injection, deviation logging.
- **Module rendering** — render module instances via
`stardust/canon/modules/<id>.html`; bespoke slots logged
with `data-bespoke`.
- **Apply content-preservation rules** per
`reference/content-preservation.md`. Internal-link rewriting
always emits migrated-tree paths; missing slugs flagged
broken.
- **Compose `<head>` metadata** per
`reference/metadata-and-jsonld.md` (five categories;
page-type-driven JSON-LD).
- **Validate** per T&M § Validation contracts. Strict contracts
refuse the page; soft contracts log and continue.
- **Compute output path** per migration-procedure.md
§ Output path mapping.
- **Asset bundling.** Scan the final HTML for asset references
(six detection shapes per
`reference/asset-bundling.md` § Detection), copy each unique
referenced subpath from `stardust/current/assets/<subpath>` to
`stardust/migrated/assets/<subpath>` (preserving subdir
structure), then rewrite every reference to the root-relative
form `/assets/<subpath>`. Cross-page dedup uses a
module-level Set seeded from
`state.json.migrate.bundledAssets[]`. Missing source assets
warn-and-skip per § Edge cases; the bundle stays internally
consistent.
- **Write** the migrated `index.html` and the `_meta.json`
sidecar in the same directory. Provenance block as first
child of `<head>`. Record `assetsBundled` (count of unique
asset refs on this page) in `_meta.json`.
### Phase 3 — Sitewide assets and bundle finalisation
Per-page asset bundling already happened in Phase 2 (every
referenced media subpath is on disk under
`stardust/migrated/assets/`). PhasRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.