This is NOT the Next.js you know

This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in node_modules/next/dist/docs/ before writing any code. Heed deprecation notices.

AI Agent Instructions

CONTEXT

Framework: Next.js (App Router) Styling: Tailwind + shadcn/ui Language: TypeScript


RULES

  • BEFORE coding → read /src/app/docs/*
  • BEFORE DB queries → read /src/app/docs/database-schema/page.md
  • BEFORE PR → run pnpm build (REQUIRED)
  • WHEN creating/modifying a feature → MUST document it in /src/app/docs/features/
  • FAIL CONDITION: build fails → STOP

DECISION LOGIC

  • IF UI → use shadcn components
  • IF data fetching → server components
  • IF mutation → server actions

NAVIGATION

  • Components → /src/components/
  • Routes → /src/app/
  • Docs → /src/app/docs/

PRIORITY ORDER

  1. Documentation (/src/app/docs/)
  2. Existing codebase
  3. Assumptions

FAILURE HANDLING

  • If unclear → check docs
  • If conflict → docs win
  • If missing → stop and flag