Re-home the Buttondown email templates from packages/site to @dossier/app (the subscribe endpoint moved)
task-rehome-email-templates-to-app
Re-home the Buttondown email templates to @dossier/app
packages/site/emails/ holds the transactional email templates — the source-of-truth words new subscribers receive, tagged by capture door (Ship the landing publicly behind a docs-gate flag, capture demand through two honest doors, into a list we own): confirmation.md (double opt-in), welcome-early-access.md, welcome-design-partner.md, plus the wiring README.md. They were co-located with the capture endpoint when it lived at packages/site/src/pages/api/subscribe.ts.
The drift
Migrate chrome-light app surfaces to SvelteKit; docs stay on Astro/Starlight (two apps, one origin) Phase 4 moved the subscribe endpoint to @dossier/app (packages/app/src/routes/api/subscribe/+server.ts, Buttondown body verbatim). The templates stayed behind in the now-stripped docs-only @dossier/docs package, decoupled from the code that uses them, and the README still points at ../src/pages/api/subscribe.ts — a path that no longer exists. Content and the endpoint that drives it should live together.
The work
git mv packages/site/emails/ into @dossier/app (alongside the subscribe route), and fix the README's subscribe.ts reference to the new +server.ts path. These are content files Buttondown sends — not imported by code — so this is a relocation + a doc-link fix, no build wiring. Preserve the swappable-seam discipline: the templates are checked in precisely so the words move with us off Buttondown (Resend is the noted alternative) — that framing (Ship the landing publicly behind a docs-gate flag, capture demand through two honest doors, into a list we own) must survive the move.
Why a task, not a fix-in-place
The endpoint owner moved; deciding the templates' new home and re-pointing the README is a small but real surface-ownership call better made by the FDE/surface owner than patched blind. Owner Principal Forward Deployed Engineer (drove the migration); assignee Astro Starlight Engineer (owns the retained docs/funnel surface where the templates currently sit). confidence: inferred (agent-surfaced from the Phase-4 move, verified against the filesystem). Depends on (ordering hint) Execute the SvelteKit app migration (DEC-0043) — phased, no big-bang, apex domain moved only at final cutover — the @dossier/app subscribe route is the destination.
Board globbed before filing — no open task referenced the email templates.
Closed 2026-06-17
git mv packages/site/emails → packages/app/emails (all four files moved as renames, history preserved), re-homing the Buttondown templates alongside their endpoint in @dossier/app. Kept at the package root — mirroring the prior packages/site/emails/ location — rather than inside src/routes/, where SvelteKit treats stray files as routing input. Fixed four stale README references: the capture endpoint (../src/pages/api/subscribe.ts → ../src/routes/api/subscribe/+server.ts), two bare subscribe.ts mentions → +server.ts, and the voice source (../src/pages/index.astro, deleted in the migration → ../src/lib/components/LandingPage.svelte). A pure content relocation — grep confirms nothing in @dossier/app imports the templates, so no wiring changed and the swappable-seam discipline (Ship the landing publicly behind a docs-gate flag, capture demand through two honest doors, into a list we own) is intact. Closed by the Principal Forward Deployed Engineer.