Imported from tanan/blog (
AGENTS.md). Install upstream withnpx skills add tanan/blog. Copyright stays with the author.
Skill Loading
Before substantial work:
- Skill check: run
npx @tanstack/intent@latest list, or use skills already listed in context. - Skill guidance: if one local skill clearly matches the task, run
npx @tanstack/intent@latest load <package>#<skill>and follow the returnedSKILL.md. - Monorepos: when working across packages, run the skill check from the workspace root and prefer the local skill for the package being changed.
- Multiple matches: prefer the most specific local skill for the package or concern you are changing; load additional skills only when the task spans multiple packages or concerns.
Project: blog
Blank TanStack Start app, kept intentionally minimal: one root route, one index route, no UI framework, no devtools, no test runner, no example components.
Stack
- Framework: TanStack Start (React) —
@tanstack/react-start,@tanstack/react-router,@tanstack/router-plugin - Runtime: React 19 + React DOM 19
- Build: Vite 8 +
@vitejs/plugin-react - Language: TypeScript 5
- Package manager: bun (lockfile:
bun.lock) - Toolchain: biome (
biome.json, scripts:format,lint,check) - Routing: filesystem (
src/routes/), generated tree atsrc/routeTree.gen.ts
How this project was scaffolded
Run from /Users/anan/zidai/git/tanan/ (or any scratch dir):
npx @tanstack/cli@latest create blog --agent --package-manager bun --toolchain biome
Follow-ups inside the project:
npx @tanstack/intent@latest install # writes the intent-skills block above
npx @tanstack/intent@latest list # discover available skills before substantial changes
The CLI scaffold landed in a nested blog/blog/ directory. Its inner .git was deleted and its contents moved up into the working repo at /Users/anan/zidai/git/tanan/blog/. The pre-existing parent .git was preserved.
What the CLI gave us, and what was removed
The @tanstack/cli --agent mode bundles defaults that the user brief explicitly rejected ("blank, no extra integrations or feature scaffolding"). The following were stripped after the initial scaffold:
| Removed | Why |
|---|---|
@tailwindcss/vite, tailwindcss, @tailwindcss/typography |
"No extra integrations" — UI styling not requested |
lucide-react |
Icon library — not requested |
@tanstack/react-devtools, @tanstack/react-router-devtools, @tanstack/devtools-vite |
Devtools — not requested |
@tanstack/react-router-ssr-query |
Query/SSR adapter — not requested |
vitest, jsdom, @testing-library/dom, @testing-library/react, test script |
Testing stack — not part of the blank brief |
src/components/{Header,Footer,ThemeToggle}.tsx |
Example UI |
src/routes/about.tsx |
Example route |
src/styles.css |
Tailwind/theme tokens, no longer referenced |
Re-add any of these intentionally if the project grows beyond "blank".
Commands
bun install # install deps
bun run dev # vite dev on http://localhost:3000
bun run build # production build (client + ssr -> dist/)
bun run preview # preview built app
bun run check # biome format + lint check
bun run format # biome format only
bun run lint # biome lint only
Project layout
.
├── AGENTS.md # this file
├── biome.json # biome config (tab indent, double quotes)
├── bun.lock # bun lockfile
├── package.json
├── public/ # static assets (favicon, logos, manifest, robots)
├── src/
│ ├── router.tsx # createTanStackRouter factory + Register declaration
│ ├── routeTree.gen.ts # generated by @tanstack/router-plugin (do not edit)
│ └── routes/
│ ├── __root.tsx # document shell (HeadContent, Outlet, Scripts)
│ └── index.tsx # "/" route
├── tsconfig.json
└── vite.config.ts # tanstackStart() + viteReact() (Start plugin first)
Environment variables
- None required for the blank app.
- TanStack Start convention: client-readable env vars must be prefixed
VITE_(Vite exposes them viaimport.meta.env). Server-only secrets stay unprefixed and must only be referenced insidecreateServerFn/*.server.tsmodules.
Deployment notes (portable setup)
This app is intentionally host-agnostic. No platform adapter is wired in. To deploy:
- Run
bun run build— producesdist/client/anddist/server/server.js. - The default Start build outputs a Node-compatible SSR server entry. A bare-bones run is
node dist/server/server.js(Bun also works:bun dist/server/server.js). - For Cloudflare / Netlify / Vercel / Bun / Node-Docker, consult the
start-core/deploymentIntent skill (npx @tanstack/intent@latest load @tanstack/start-client-core#start-core/deployment) before adding host-specific config. - Keep deployment config out of the repo until a target is chosen — adding a wrong adapter is harder to undo than adding the right one later.
Key architectural decisions
- bun + biome were the user's explicit toolchain choices and are baked into both
package.jsonscripts andbiome.json. Do not swap to npm/pnpm/eslint/prettier without confirming. - No UI framework.
__root.tsxrenders<html>/<body>with no className. Add Tailwind / CSS Modules / vanilla CSS only when there's a concrete need. - No devtools, no test runner. Re-add when there's a real reason (active debugging, first test).
- Filesystem routing (not virtual). New routes go in
src/routes/. The router-plugin regeneratesrouteTree.gen.tson dev/build. - Start plugin must come before React plugin in
vite.config.ts(route generation + server-fn compilation depend on this order).
Known gotchas
verbatimModuleSyntaxremoved fromtsconfig.json. The CLI scaffold turned it on, but thestart-coreskill flags this as HIGH-severity: it can leak server-only modules into the client bundle. Keep it off.- biome schema URL is pinned.
biome.json$schemawas bumped from the scaffold's2.2.4to2.4.5to match the installed@biomejs/biomeversion. Bump when upgrading biome. - Nested git after scaffolding.
npx @tanstack/cli createinitializes its own.gitinside the new project dir. If scaffolding into an existing repo, delete the inner.git(or scaffold into a scratch dir and merge files in). - Two path aliases (
#/*and@/*) point atsrc/intsconfig.json, but only#/*is mirrored underpackage.json#imports(used at runtime by Node's subpath imports). Pick one convention before this matters.
Next steps
- Decide on a deployment target before the first deploy; load the deployment Intent skill at that point.
- Add a styling approach when the first real UI lands.
- Re-add a test runner (
vitest+ jsdom + Testing Library) when writing the first test. - Wire
@tanstack/react-router-devtoolswhen debugging routing becomes a real need. - Initialize a
.env.exampleonce any env vars exist (none today).