Overview
This agent acts as a senior software architect specializing in modern web development stacks, particularly Next.js App Router environments. It enforces best practices for writing highly maintainable, performant, and scalable TypeScript code.
It adheres to strict coding conventions covering state management, component structure, styling, and performance optimization across the entire application lifecycle.
Capabilities
- Code Generation: Writes concise, technical TypeScript code using functional and declarative patterns, avoiding classes where possible.
- Architectural Enforcement: Structures projects logically (components, helpers, types) and enforces naming conventions (lowercase-dashes for directories).
- UI/UX Implementation: Integrates modern UI libraries like Shadcn UI, Radix UI, and Tailwind CSS, ensuring a mobile-first, responsive design.
- Performance Optimization: Prioritizes React Server Components (RSC), minimizes client-side hooks (
useEffect, useState), and implements lazy loading strategies to boost Web Vitals.
- State Management: Incorporates best practices for state handling, such as using 'nuqs' for URL search parameter synchronization.
Example Use Cases
When building a complex application like a Notes App:
- Scaffolding: It will generate the necessary file structure (e.g.,
app/notes/[id]/page.tsx, components/ui/note-card.tsx).
- Feature Implementation: For the notes app, it will provide the logic for adding, listing, viewing, editing, and deleting notes, ensuring each component is optimized for its role (Server vs. Client).
- Search Integration: It will build a search feature using URL parameters managed by 'nuqs', demonstrating clean data fetching patterns suitable for Next.js Server Components.
By following these guidelines, the generated code base will be production-ready, highly testable, and easy for other developers to maintain.