# Agents Guide (Single Source of Truth) This document is the canonical reference for humans and `Agents` working in this repository. It standardizes stack, structure, workflows, and guardrails so contributions stay consistent and safe. ## 1) Scope and goals * Make onboarding fast with a single place to look * Define conventions so changes are predictable * Provide exact commands that `Agents` can run without guesswork * Prevent accidental regressions in routing, theming, SEO, and deployment ## 2) Tech stack * **Framework**: Next.js 15.5.4, React 19, TypeScript * **Styling**: Tailwind CSS 4, shadcn/ui * **Animation**: Framer Motion * **Forms**: react-hook-form + Zod * **Platform**: Cloudflare Workers via OpenNext * **Package manager**: npm * **Node**: LTS 20 or 22 ## 3) Project layout ``` root ├─ src/ │ ├─ app/ # App Router pages and layouts │ │ ├─ (marketing)/ # Example route groups │ │ ├─ api/ # Route handlers │ │ └─ layout.tsx # Root layout, see rules below │ ├─ components/ # Reusable UI │ ├─ data/ # JSON or TS data objects consumed by pages │ ├─ lib/ # Utilities, hooks, server actions │ ├─ styles/ # globals.css, tailwind utilities if applicable │ └─ types/ # Shared types ├─ public/ # Static assets ├─ next.config.ts ├─ tailwind.config.ts ├─ wrangler.toml # Cloudflare deploy config └─ package.json ``` ### Import aliases * Prefer absolute imports using `@` mapped to `src` via `tsconfig.json` paths. ## 4) Authoritative UI system * **Theme**: dark mode is the default. Do not introduce light-first designs without approval. * **Typography**: default to Geist and Geist Mono via CSS variables. If adding a new font, add it as a variable and document it here before use. * **Components**: use shadcn/ui primitives. Extend with local wrappers placed in `src/components/ui/`. * **Spacing and rhythm**: follow Tailwind 4 defaults. Prefer utility classes over custom CSS unless componentized. * **Animation**: keep motion subtle. Framer Motion only for meaningful transitions. ## 5) Routing and layout rules * The **root layout** owns global providers, theme class, `