Project Context
!basename $(pwd)
!ls src/ 2>/dev/null | head -15
!ls tsconfig.json vite.config.* next.config.* 2>/dev/null
Request
$ARGUMENTS
Scaffold Rules
React Component → src/components/[Name]/
[Name].tsx— Component with typed props interface[Name].test.tsx— Basic test with render and key interactionsindex.ts— Barrel export
Page/Route → src/pages/ or src/app/
- Follow existing routing convention
Custom Hook → src/hooks/
use[Name].ts— Hook with TypeScript return typeuse[Name].test.ts— Test hook behavior
Service → src/services/
[name].service.ts— API calls with typed request/response[name].service.test.ts— Tests with mocked HTTP
API Route → src/routes/ or src/controllers/
- Route handler + input validation + service layer call + error handling
Before creating: check existing patterns. Match the project's style exactly.