- Format:
#XXX commit message in lowercase imperative mood - Examples:
#123 add user authentication flow#456 fix navigation menu overflow#789 refactor payment processing logic
- Rules:
- Always prefix with issue number
- Use lowercase only
- Use imperative mood (add, fix, refactor, not added, fixed, refactored)
- No colon after issue number
- Always include
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>trailer - Commit frequently — each logical unit of work (type changes, migration, service updates, UI changes) should be its own commit rather than one large commit at the end
- Format:
XXX-ticket-name-in-kebab-case - Examples:
123-add-user-authentication456-fix-navigation-overflow789-refactor-payment-processing
- Format:
#XXX Ticket Name In Title Case - Examples:
#123 Add User Authentication#456 Fix Navigation Overflow#789 Refactor Payment Processing
- Assignees: Always assign
b-at-neu(--assignee "b-at-neu") - Issue Linking: Use
Closes #XXXfor the primary issue. Use plain#XXXmentions for related issues — GitHub only recognisescloses/fixes/resolvesas closing keywords; phrases like "Part of" and "Blocks" are informational only and do not create development links
When asked to work on a ticket:
- Assign the issue to the user using
gh issue edit XXX --add-assignee "@me" - When opening a PR, always include
Closes #XXXin the PR body — GitHub will close the issue automatically on merge
- Framework: Next.js with App Router
- Database: Prisma ORM
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- Language: TypeScript (strict mode)
- NEVER use API routes (
app/api/directory) - ALWAYS use Server Actions for data mutations
- Use server components for data fetching with Prisma calls
- Import Prisma queries from separate service/repository files
- Components live in centralized
components/directory - Organize into subdirectories as needed:
components/
├── ui/ # shadcn components
├── forms/ # form-related components
├── layouts/ # layout components
└── features/ # feature-specific shared components
- Keep components focused and composable and only add comments when necessary to explain complex logic
- Use TypeScript strict mode
- Define proper types for all props and function parameters
- Avoid
anytype - Prefer interfaces for complex component props
- Use Prisma-generated types where applicable
- Define server actions in separate files (e.g.,
prisma/services/user-actions.ts) - Always use
'use server'directive - Include proper error handling and validation
- Return typed responses
- All database operations go through Prisma
- Create service/repository files for complex queries
- Keep Prisma calls in server components or server actions only
- Never expose database calls to client components
app/
├── (routes)/ # route groups
components/ # shared components
lib/
├── actions/ # server actions
├── data/ # data queries and services
├── db.ts # Prisma client
└── utils.ts # utility functions
prisma/
├── schema.prisma # Prisma schema
└── services/ # server actions and data access logic
- Use named exports over default exports in all cases
- Prefer functional components with hooks
- Use async/await over promises
- Implement proper loading and error states
- Use Tailwind classes, avoid custom CSS unless absolutely necessary
- Follow shadcn/ui patterns for component composition
- For single line loops or conditionals, do not use curly braces
-
Server vs Client Components:
- Default to server components
- Only use
'use client'when needed (interactivity, hooks, browser APIs)
-
Data Fetching:
- Fetch data in server components
- Use Prisma for all database queries
- Implement proper error boundaries
-
Forms:
- Use Server Actions for form submissions
- Implement progressive enhancement
- Add proper validation (client + server)
-
Performance:
- Leverage Next.js caching strategies
- Use
revalidatePathorrevalidateTagafter mutations
-
Security:
- Validate all inputs
- Never expose sensitive data to client
- Use environment variables for secrets
Before pushing, always run these locally and fix any failures before pushing:
npx eslint . --max-warnings=0
npx prettier --write .
npx tsc --noEmitCI runs all three checks and will fail if any are off.
- When resolving merge conflicts, preserve features from both sides unless one side is clearly superseded
- Prefer editing existing files over creating new ones
- Always use git worktrees when working on a feature branch to avoid branch switching issues
- Use
isolation: "worktree"when spawning agents so each agent works in an isolated copy of the repo - This prevents conflicts when multiple branches are being worked on simultaneously
- Worktree settings are configured in
.claude/settings.jsonunderworktree.symlinkDirectoriesto avoid duplicatingnode_modules