Execute the SvelteKit app migration (DEC-0043) — phased, no big-bang, apex domain moved only at final cutover
task-sveltekit-app-migration
Execute the SvelteKit app migration (DEC-0043)
Migrate chrome-light app surfaces to SvelteKit; docs stay on Astro/Starlight (two apps, one origin) decided the topology — chrome-light surfaces move to a new SvelteKit app (recommended @dossier/app); docs stay on Astro + Starlight (recommended rename @dossier/site → @dossier/docs, docs-only); both unified on one Vercel origin via a /knowledge/:path* rewrite; a shared @dossier/okf-view leaf extracted so both apps read the KB from one source of truth. This atom tracks the execution.
Why a task, not a fix-in-place
This is multi-day, multi-phase build work (DEC-0043 estimates ~4–6 focused days, dominated by the 488-line landing port) requiring the Principal Forward Deployed Engineer's judgment — the phased plan, the preview-URL proving step, and the single apex-domain cutover are the FDE's to drive. The log-auditor surfaced it from the decision and files it so the follow-up is durable, owned, and trackable rather than a line in a reply. confidence: inferred (agent-derived from the decision's named follow-ups, not human-curated).
Status (2026-06-17 — done): LIVE on production, every surface unified on one origin
The Principal Forward Deployed Engineer (orchestrating the Principal SvelteKit Engineer + Astro Starlight Engineer) executed the full migration of plans/sveltekit-migration.md, all gate-verified, and both Vercel projects are now live on production — confirmed by the user this turn ("everything looks good on prod, sites are loading"). This atom moves review → done and DEC-0043 is promoted asserted → verified. See Dossier — Decision & Audit Log (2026-06-17, "DEC-0043 VERIFIED").
- MET (built + verified):
@dossier/okf-viewextracted and consumed by both apps (Phase 0);@dossier/apprenders every chrome-light surface (Phases 1–4); docs stripped to/knowledge/*(90 pages) with Starlight retained and@dossier/site → @dossier/docsapplied — package name only, dir stayspackages/site(Phase 5); zero nav flash —startViewTransition0× on client nav, proven in-browser (the DEC-0043 trigger, dead); theme continuity via the keptstarlight-themekey +app.htmlno-FOUC script; pixel-faithful landing port; full suite 385 passed / 1 skipped and all gates green. - MET (the cutover — DEC-0043 promotion gate, LIVE): both projects deployed — app on
dak-dossier.vercel.app, docs ondak-dossier-docs.vercel.app. Livecurlconfirms/,/board,/graph,/api/subscribeserved by the app and/knowledge/,/decisions/*,/tasks/*proxied + styled from the docs on one origin. The unifier is the guarded catch-all inpackages/app/vercel.json— not the originally-planned/knowledge/:path*rewrite, which 404'd the top-level atom routes (/decisions/*etc., not/knowledge/*) and left Starlight's root-level hashed assets unstyled; corrected in commit61b74d0. No custom apex domain exists — production is the Vercel project domain, which satisfies the gate; a later custom-domain attach is trivial. - DEFERRED fast-follow (now its own task, still open): Svelte-ify the board's ~270 lines of vanilla JS carried verbatim in
onMount(Phase 7) — split out to Svelte-ify the board's ~270 lines of vanilla-JS interactivity (the DEC-0043 / Phase-7 fast-follow), NOT dropped. - Surfaced during execution (filed separately): re-home the Buttondown email templates now
/api/subscribemoved → Re-home the Buttondown email templates from packages/site to @dossier/app (the subscribe endpoint moved); decide whether@dossier/docskeeps the now-unused@vercel/analytics→ Decide whether @dossier/docs keeps @vercel/analytics now that the landing (its only consumer) moved to @dossier/app; thegenerate-landingskill + DEC-0037 prose point at the oldcontent/landingpath → folded into Fix the stale round-trip-test path in the generate-landing SKILL.md (points at a file that no longer exists). - Decisions taken mid-build (recorded same-turn): Lenient KB-atom reader in @dossier/okf-view (readKbAtoms) — faithful getCollection reproduction for the SvelteKit app (the lenient
readKbAtomsreproducing Astro'sgetCollectionprofile) and Persistent read-only chrome via an (app) route-group layout — stop the header re-animating on intra-app nav (the(app)route-group layout so the header doesn't re-animate on intra-app nav).
Guardrails (from DEC-0043)
- No big-bang. Move the apex domain exactly once, at the final cutover, after the full SvelteKit app is proven on a preview URL.
- Two-way door. The rewrite + domain assignment are trivially reversible (subdomain split kept as a fallback).
- Pixel-faithful landing. Port the 488-line landing per the Recalibrate the Dossier brand identity — demote color, promote type + restraint + craft — then build the showcase landing content-model invariants.
- Stay on the stack. SvelteKit is Vite-based — the VoidZero/Vite TypeScript lean (
CLAUDE.md) holds; no new build paradigm. - Sovereignty preserved. Both apps stay derived, replaceable surfaces over the OKF git repo (Adopt OKF as Dossier's canonical knowledge format); design tokens (Establish the design system and the UX-engineering function) consumed unchanged.
Board globbed before filing — no open task covered the SvelteKit migration.