Build & Development Commands - Use the project's existing package manager (npm, yarn, pnpm). - Use npx create-next-app
or equivalent for scaffolding only when no starter exists.
Testing Guidelines - Use unit tests for JS logic, and E2E tests (e.g., Playwright) for UI. - Write tests that simulate actual user behavior where possible.
Code Style & Guidelines - Use semantic HTML (<header>
, <main>
, etc.) and accessible attributes (e.g., ARIA). - Follow CSS best practices — avoid inline styles unless dynamic. - In JavaScript, use const
and let
; avoid var
. - Prefer ES6+ syntax; use arrow functions, destructuring, and spread/rest patterns.
Documentation Guidelines - Document component props and expected structure. - Link to MDN when referencing browser APIs. - Provide visual examples for reusable components or layouts.