TL-M0-09 · Scaffold apps/docs
Why: Starlight is where the engineering docs go after cutover (D23). Until then it only has to build.
ID TL-M0-09 · Level L0 · Run order row 9
apps/docs is a Starlight site and workspace member named docs that builds and runs.
Before
Section titled “Before”TL-M0-08 is Done.
1 · Create the site from the Starlight template, without installing and without git
Section titled “1 · Create the site from the Starlight template, without installing and without git”pnpm create astro@latest apps/docs --template starlight --no-install --no-git --skip-houston --yes2 · Make it a workspace member named docs
Section titled “2 · Make it a workspace member named docs”pnpm --dir apps/docs pkg set name=docsrm -f apps/docs/pnpm-workspace.yaml apps/docs/pnpm-lock.yamlpnpm --dir apps/docs pkg delete packageManager3 · Install from the root. pnpm stops on esbuild's install script; approve it, because Astro's bundler needs its native binary
Section titled “3 · Install from the root. pnpm stops on esbuild's install script; approve it, because Astro's bundler needs its native binary”pnpm installpnpm approve-builds esbuild4 · Format the template with Biome, build it, and look at it. Open http://localhost:4321, then press Ctrl+C
Section titled “4 · Format the template with Biome, build it, and look at it. Open http://localhost:4321, then press Ctrl+C”pnpm formatpnpm --filter docs buildpnpm --filter docs dev5 · Commit
Section titled “5 · Commit”git add -Agit commit -m "build(docs): scaffold the Starlight docs app"Expect
Section titled “Expect”- Block 1: Astro reports the project created in apps/docs.
- Block 3: pnpm install ends with “ERR_PNPM_IGNORED_BUILDS” and “Ignored build scripts: esbuild@…”. approve-builds then runs “esbuild postinstall … Done”. If the list names any package other than esbuild, stop and paste it.
- Block 4: format fixes some files; the build ends with “[build] Complete!”; the browser shows the Starlight welcome page.
- Block 5: the commit line.
cat pnpm-workspace.yamlcat apps/docs/package.json | head -5allowBuilds lists esbuild: true and lefthook: true. The docs package is named docs.
If it fails
Section titled “If it fails”“Template starlight could not be found”: the network blocked GitHub, where the templates live. Paste the output.
rm -rf apps/docsgit checkout -- pnpm-workspace.yaml pnpm-lock.yamlpnpm installDone 2026-10-05 (zuki)