Imported from ayushdixit23/ai-document-rag-app (
apps/web/AGENTS.md). Install upstream withnpx skills add ayushdixit23/ai-document-rag-app --skill web. Copyright stays with the author.
AGENTS.md — Web (Next.js)
Cursor agents: see
.cursor/rules/web-development.mdc,design-system.mdc, andweb-structure.mdc.
Design system (required for all UI)
Source of truth: DESIGN.md (Notion-inspired warm workspace).
Before writing or editing any page, component, layout, or CSS in apps/web:
- Read
apps/web/DESIGN.mdin full. - Follow its colors, typography, spacing, radius, elevation, and component patterns.
- Map tokens into
app/globals.css(:root,@theme) and Tailwind — do not invent a conflicting palette. - On conflict with generic frontend-design defaults,
DESIGN.mdwins.
Do not build UI from memory or from shadcn defaults alone. Compose @repo/ui primitives, then style them to match DESIGN.md.
Essential commands
# from repo root
pnpm exec turbo dev --filter=web
pnpm exec turbo lint check-types --filter=web
pnpm exec turbo build --filter=web
Stack
- Next.js App Router, React 19, Tailwind CSS v4
- Shared UI:
@repo/ui(shadcn primitives) - Auth: Better Auth client in
lib/auth-client.ts - Theme:
next-themesviacomponents/theme-provider.tsx
Structure
- Thin
app/**/page.tsx— compose only - App blocks / forms in
app/feature folders orcomponents/ - Shared helpers in
lib/ - Do not copy shadcn primitives into
apps/web; import from@repo/ui/components/*
Checklist before shipping UI
- Read
DESIGN.md - Read relevant skills listed in
.cursor/rules/web-development.mdc - Prefer Server Components;
'use client'only when required - Use
cn()from@repo/ui/lib/utils - Run
pnpm exec turbo lint check-types --filter=web